Add tests to verify output when filtering