Unit tests for filtering