/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
KeyedObjects2D ko2D1 = new KeyedObjects2D();
ko2D1.addObject(new Double(234.2), "Row1", "Col1");
ko2D1.addObject(null, "Row1", "Col2");
ko2D1.addObject(new Double(345.9), "Row2", "Col1");
ko2D1.addObject(new Double(452.7), "Row2", "Col2");
KeyedObjects2D ko2D2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(ko2D1);