### Question:
OffHeapTimeTreeChunk implements TimeTreeChunk { @Override public long next(long key) { long resultKey; space.lockByIndex(index); try { final long addr = space.addrByIndex(index); long result = internal_previousOrEqual_index(addr, key); if (result != -1) { result = internal_next_index(addr, result); } if (result != -1) { resultKey = key(addr, result); } else { resultKey = Constants.NULL_LONG; } } finally { space.unlockByIndex(index); } return resultKey; } OffHeapTimeTreeChunk(final OffHeapChunkSpace p_space, final long p_index); static void free(final long addr); @Override final long world(); @Override final long time(); @Override final long id(); @Override final int size(); @Override long extra(); @Override void setExtra(long extraValue); @Override long extra2(); @Override void setExtra2(long extraValue); @Override final long index(); @Override final long magic(); @Override final void range(final long startKey, final long endKey, final long maxElements, final TreeWalker walker); @Override final void save(final Buffer buffer); @Override final void saveDiff(Buffer buffer); @Override final void load(Buffer buffer); @Override final void loadDiff(Buffer buffer); @Override final long previousOrEqual(final long key); @Override final long previous(long key); @Override long next(long key); @Override final void insert(final long insertKey); @Override final void unsafe_insert(final long p_key); @Override final byte chunkType(); @Override final void clearAt(long max);  }### Answer:
@Test public void nextTest() { ChunkSpace space = factory.newSpace(100, null, false); TimeTreeChunk tree = (TimeTreeChunk) space.createAndMark(ChunkType.TIME_TREE_CHUNK, 0, 0, 0); Buffer buffer = factory.newBuffer(); buffer.writeAll("W: tree.load(buffer); buffer.free(); space.free(tree); space.freeAll(); }