Add serialization tests