/**
* Serialize an instance, restore it, and check for identity.
*/
public void testSerialization() {
final Rotation r1 = Rotation.CLOCKWISE;
Rotation r2 = null;
try {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(r1);