Adding unit tests for filtering