@Test
  public void testOddDataInput() throws Exception {
    SerializableIntWrapper o = new SerializableIntWrapper(-1);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataSerializer.writeObject(o, new DataOutputStream(baos));
    OddDataInput odi = new OddDataInput(ByteBuffer.wrap(baos.toByteArray()));
    Object o2 = DataSerializer.readObject(odi);
    assertEquals(o, o2);
  }
Usually the DataInput instance passed to DataSerializer.readObject is an instance of
InputStream. Make sure that an object that uses standard java serialization can be written and
read from a DataInput that is not an instance of InputStream. See bug 47249.
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java