@Test public void roundTrip() throws Exception { File worldDir = new File(WORLD_PATH); try (DataOutputStream outputStream = RegionFileCache.openChunkForWriting(worldDir, X, Z)) { outputStream.writeUTF(CHUNK_CONTENT); } try (DataInputStream inputStream = RegionFileCache.openChunkForReading(worldDir, X, Z)) { String readBack = inputStream.readUTF(); assertEquals(CHUNK_CONTENT, readBack); } }