ByteArrayOutputStream bos=new ByteArrayOutputStream();
ObjectOutputStream oos=new ObjectOutputStream(bos);
byte[] buf=null;
ByteArrayInputStream bis=null;
ObjectInputStream ois;
LogicalAddress a2, b2;
a.setAdditionalData(null);
b.setAdditionalData("Bela Ban".getBytes());
oos.writeObject(a);
oos.writeObject(b);
buf=bos.toByteArray();
bis=new ByteArrayInputStream(buf);
ois=new ObjectInputStream(bis);
a2=(LogicalAddress)ois.readObject();
b2=(LogicalAddress)ois.readObject();
assertTrue(a.equals(a2));
assertTrue(b.equals(b2));
assertTrue(a2.getAdditionalData() == null);
assertTrue("Bela Ban".equals(new String(b2.getAdditionalData())));
}