/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
DefaultXYDataset d1 = new DefaultXYDataset();
double[] x1 = new double[] {1.0, 2.0, 3.0};
double[] y1 = new double[] {4.0, 5.0, 6.0};
double[][] data1 = new double[][] {x1, y1};
d1.addSeries("S1", data1);
XYBarDataset bd1 = new XYBarDataset(d1, 5.0);
XYBarDataset bd2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);