public static void unmap(String resourceDescription, ByteBuffer buffer) throws IOException {
        if (!buffer.isDirect())
            throw new IllegalArgumentException("Unmapping only works with direct buffers");
        if (UNMAP == null)
            throw UNMAP_NOT_SUPPORTED_EXCEPTION;

        try {
            UNMAP.invokeExact(buffer);
        } catch (Throwable throwable) {
            throw new IOException("Unable to unmap the mapped buffer: " + resourceDescription, throwable);
        }
    }
@Test
    public void testUnmap() throws Exception {
        File file = TestUtils.tempFile();
        try (FileChannel channel = FileChannel.open(file.toPath())) {
            MappedByteBuffer map = channel.map(FileChannel.MapMode.READ_ONLY, 0, 0);
            ByteBufferUnmapper.unmap(file.getAbsolutePath(), map);
        }
    }