@Test
  public void testClassObject() throws Exception {
    Class<? extends DataSerializableJUnitTest> c = getClass();

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

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