unit test for filtering