### Question:
MMapBuffer implements BufferResource { @Deprecated public static void madviseDontNeedTrackedBuffers() { if (openBuffersTracker == null) { return; } openBuffersTracker.forEachOpenTrackedBuffer(new Function<MMapBuffer, Void>() { @Override public Void apply(final MMapBuffer b) { madviseDontNeed(b.memory.getAddress(), b.memory.length()); return null; } }); } MMapBuffer(File file, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(File file, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(Path path, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(Path path, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(RandomAccessFile raf, File file, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(RandomAccessFile raf, Path path, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order);  MMapBuffer(RandomAccessFile raf, File file, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order, boolean closeFile);  MMapBuffer(RandomAccessFile raf, Path path, long offset, long length, FileChannel.MapMode mapMode, ByteOrder order, boolean closeFile); void advise(long position, long length); void sync(long position, long length); void mlock(long position, long length); void munlock(long position, long length); void mincore(long position, long length, DirectMemory direct); @Override void close(); DirectMemory memory(); @Deprecated static boolean isTrackingEnabled(); @Deprecated static void madviseDontNeedTrackedBuffers(); static final int PAGE_SIZE; }### Answer:
@Test public void testMadviseDontNeedTrackedBuffers() throws IOException { try { MMapBuffer.setTrackingEnabled(false); MMapBuffer.madviseDontNeedTrackedBuffers(); MMapBuffer.setTrackingEnabled(true); MMapBuffer.madviseDontNeedTrackedBuffers(); final File tempFile = File.createTempFile("TestMMapBuffer", ""); try (MMapBuffer ignored = new MMapBuffer(tempFile, 0, 10, FileChannel.MapMode.READ_WRITE, ByteOrder.nativeOrder())) { MMapBuffer.madviseDontNeedTrackedBuffers(); } MMapBuffer.madviseDontNeedTrackedBuffers(); } finally { MMapBuffer.setTrackingEnabled(false); } }