/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
final PaintTable t1 = new PaintTable();
t1.setPaint(0, 0, Color.blue);
t1.setPaint(0, 1, Color.red);
t1.setPaint(1, 0, Color.yellow);
t1.setPaint(1, 1, Color.green);
PaintTable t2 = null;
try {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(t1);