/**
* Serialize an instance, restore it, and check for identity.
*/
public void testSerialization() {
final Layer l1 = Layer.FOREGROUND;
Layer l2 = null;
try {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(l1);