/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
XYTextAnnotation a1 = new XYTextAnnotation("Text", 10.0, 20.0);
XYTextAnnotation a2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(a1);