serializing and deserializing test examples in java with and without code generation