The framework for testing serialization is currently PROPOSED and being
discussed on the development mailing list dev@harmony.apache.org.
Please direct comments and questions there.

The framework for testing serialization is intended to simplify and formalize
development of serialization tests. This document contains guidelines for
creating tests and conventions for resource files.

The first parameter TestCase is used to locate resource
file(s) that contains serialized object(s).
The second parameter is an object
or an array of objects to be compared with object(s) deserialized from
resource file(s).
The third parameter is optional.

To create a compatibility test for selected class, a developer should:

Serialize object(s) on certified implementation, store serialized
form(s) in resource file(s) and place it(them) according to the
conventions

Add the testSerializationCompatibility method to a unit test

Invoke one of the methods, mentioned above, with corresponding arguments

Negative Testing

If a class of object(s) to be compared does not have
equals(Object) method or the testing framework can not find appropriate comparator, a
test has to implement the interface. The interface has only
one method to be implemented: