private void checkRoundTrip(Object o1) throws IOException, ClassNotFoundException {
    DataOutputStream out = getDataOutput();
    DataSerializer.writeObject(o1, out);
    out.flush();
    DataInput in = getDataInput();
    assertEquals(o1, DataSerializer.readObject(in));
    baos = new ByteArrayOutputStream();
  }
Data serializes and then data de-serializes the given object and asserts that the two objects
satisfy o1.equals(o2)
geode-core/src/test/java/org/apache/geode/cache/query/internal/QueryObjectSerializationJUnitTest.java