DirectBufferAccess implements DirectByteBufferAccess { @Override public long getAddress(ByteBuffer buffer) { return buffer instanceof DirectBuffer ? ((DirectBuffer) buffer).address() : 0; }  @Override long getAddress(ByteBuffer buffer);  }
@Test public void testLoader() { final ByteBuffer buffer = ByteBuffer.allocateDirect(16); final long address = DirectByteBufferAccessLoader.getAddress(buffer); assertTrue(address != 0); }
@Test public void testGetAddress() { final ByteBuffer buffer = ByteBuffer.allocateDirect(16); final long address = new DirectBufferAccess().getAddress(buffer); assertTrue(address != 0); }