More unit tests for serialization