Add unit tests for filter serialization