/**
* Serialize an instance, restore it, and check for equality.
*/
@Test
public void testSerialization() throws IOException, ClassNotFoundException {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(l1);