public void testNativeDirectMemoryCompatibility() {
   decimalSerializer.serializeNative(OBJECT, stream, 0);
   ODirectMemoryPointer pointer = new ODirectMemoryPointer(stream);
   try {
     Assert.assertEquals(decimalSerializer.deserializeFromDirectMemory(pointer, 0), OBJECT);
   } finally {
     pointer.free();
   }
 }
  public void testNativeDirectMemoryCompatibility() {
    binarySerializer.serializeNativeObject(OBJECT, stream, 0);

    ODirectMemoryPointer pointer = ODirectMemoryPointerFactory.instance().createPointer(stream);

    try {
      Assert.assertEquals(binarySerializer.deserializeFromDirectMemoryObject(pointer, 0), OBJECT);
    } finally {
      pointer.free();
    }
  }