### Question:
MappedBuffer extends ByteBufferBuffer { public static MappedBuffer allocate(File file) { return allocate(file, FileChannel.MapMode.READ_WRITE, DEFAULT_INITIAL_CAPACITY, Integer.MAX_VALUE); } protected  MappedBuffer(MappedBytes bytes, int offset, int initialCapacity, int maxCapacity); static MappedBuffer allocate(File file); static MappedBuffer allocate(File file, FileChannel.MapMode mode); static MappedBuffer allocate(File file, int capacity); static MappedBuffer allocate(File file, FileChannel.MapMode mode, int capacity); static MappedBuffer allocate(File file, int initialCapacity, int maxCapacity); static MappedBuffer allocate(File file, FileChannel.MapMode mode, int initialCapacity, int maxCapacity); @Override MappedBuffer duplicate(); void delete();  }### Answer:
@Test public void testPersist() { File file = FileTesting.createFile(); try (MappedBuffer buffer = MappedBuffer.allocate(file, 16)) { buffer.writeLong(10).writeLong(11).flip(); assertEquals(10, buffer.readLong()); assertEquals(11, buffer.readLong()); } try (MappedBuffer buffer = MappedBuffer.allocate(file, 16)) { assertEquals(10, buffer.readLong()); assertEquals(11, buffer.readLong()); } }