Serialization unit tests