/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
VectorDataItem v1 = new VectorDataItem(1.0, 2.0, 3.0, 4.0);
VectorDataItem v2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(v1);
out.close();