/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
IntervalCategoryItemLabelGenerator g1
= new IntervalCategoryItemLabelGenerator(
"{3} - {4}", DateFormat.getInstance()
);
IntervalCategoryItemLabelGenerator g2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(g1);