unit test for filter