Test serialization code.