### Question:
ResizeableMappedStore extends AbstractMappedStore { public void resize(long newSize) throws IOException { validateSize(newSize); unmapAndSyncToDisk(); resizeIfNeeded(0L, newSize); this.mmapInfoHolder.setSize(newSize); map(0L); } ResizeableMappedStore(File file, FileChannel.MapMode mode, long size);  ResizeableMappedStore(File file, FileChannel.MapMode mode, long size,
                                 ObjectSerializer objectSerializer); void resize(long newSize);  }### Answer:
@Test public void testResizableMappedStore() throws IOException { File file = MappedStoreTest.getStoreFile("resizable-mapped-store.tmp"); final int smallSize = 1024, largeSize = 10 * smallSize; { ResizeableMappedStore ms = new ResizeableMappedStore(file, FileChannel.MapMode.READ_WRITE, smallSize); DirectBytes slice1 = ms.bytes(); for (int i = 0; i < smallSize; ++i) { slice1.writeByte(42); } ms.resize(largeSize); DirectBytes slice2 = ms.bytes(); slice2.skipBytes(smallSize); for (int i = smallSize; i < largeSize; ++i) { slice2.writeByte(24); } ms.close(); } assertEquals(largeSize, file.length()); { ResizeableMappedStore ms = new ResizeableMappedStore(file, FileChannel.MapMode.READ_WRITE, file.length()); DirectBytes slice = ms.bytes(); assertEquals(42, slice.readByte(smallSize - 1)); assertEquals(24, slice.readByte(largeSize - 1)); slice.release(); ms.close(); } }