@Test
  public void testDataSerializableFixedIDInt() throws IOException, ClassNotFoundException {
    assertFalse(
        ((DSFIDSerializerImpl) InternalDataSerializer.getDSFIDSerializer())
            .getDsfidmap2()
            .containsKey(DummyIntDataSerializableFixedID.INT_SIZE_id));
    InternalDataSerializer.getDSFIDSerializer().register(
        DummyIntDataSerializableFixedID.INT_SIZE_id,
        DummyIntDataSerializableFixedID.class);
    assertTrue(
        ((DSFIDSerializerImpl) InternalDataSerializer.getDSFIDSerializer())
            .getDsfidmap2()
            .containsKey(DummyIntDataSerializableFixedID.INT_SIZE_id));

    try {
      DummyIntDataSerializableFixedID dummyObj = new DummyIntDataSerializableFixedID();

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      DataOutputStream out = new DataOutputStream(baos);
      DataSerializer.writeObject(dummyObj, out);
      byte[] bytes = baos.toByteArray();

      String type = DataType.getDataType(bytes);
      assertEquals("org.apache.geode.internal.serialization.DataSerializableFixedID:"
          + DummyIntDataSerializableFixedID.class.getName(),
          type);
    } finally {
      ((DSFIDSerializerImpl) InternalDataSerializer.getDSFIDSerializer())
          .getDsfidmap2()
          .remove(DummyIntDataSerializableFixedID.INT_SIZE_id);
      assertFalse(
          ((DSFIDSerializerImpl) InternalDataSerializer.getDSFIDSerializer())
              .getDsfidmap2()
              .containsKey(DummyIntDataSerializableFixedID.INT_SIZE_id));
    }
  }
Tests the DataType support for off-heap MemoryInspector.
geode-core/src/test/java/org/apache/geode/internal/offheap/DataTypeJUnitTest.java