@Test
  public void testLongObject() throws Exception {
    Long value = getRandom().nextLong();

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

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