Test coverage for this file has recently been added (thanks @edoyango). Existing functionality was covered, but it looks like there is a 'not' in the function which is actually backwards to the intended functionality.
#229 contains the discussion of this point.
I will shortly merge the PR as it improves test coverage. This issue exists to review, and if necessary make corrections, to the filter class to ensure exceptions are raised in the correct circumstances.