@Test
  public void testUUID() throws Exception {
    UUID o = UUID.randomUUID();

    DataOutputStream out = getDataOutput();
    DataSerializer.writeObject(o, out, false);
    out.flush();

    DataInput in = getDataInput();
    UUID o2 = DataSerializer.readObject(in);
    assertEquals(o, o2);
  }
Tests data serializing a {@link Class} using {@link DataSerializer#writeObject}.
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java