/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
PolynomialFunction2D f1 = new PolynomialFunction2D(new double[] {1.0,
2.0});
PolynomialFunction2D f2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(f1);