private void checkRoundTrip(Object o1) throws IOException, ClassNotFoundException {
  DataOutputStream out=getDataOutput();
  DataSerializer.writeObject(o1,out);
  out.flush();
  DataInput in=getDataInput();
  assertEquals(o1,DataSerializer.<Object>readObject(in));
  this.baos=new ByteArrayOutputStream();
}

private void checkRoundTrip ( Object o1 ) throws IOException , ClassNotFoundException { DataOutputStream out = getDataOutput ( ) ; DataSerializer . writeObject ( o1 , out ) ; out . flush ( ) ; DataInput in = getDataInput ( ) ; assertEquals ( o1 , DataSerializer . < Object > readObject ( in ) ) ; this . baos = new ByteArrayOutputStream ( ) ; }
data serializes and then data de - serializes the given object and asserts that the two objects satisfy o1 . equals ( o2 )
