IndexV2 implements Index { @Override public IndexEntryV2 entry(int i) { return new IndexEntryV2(entries, checkElementIndex(i, count()) * IndexEntryV2.SIZE); } IndexV2(Buffer entries); @Override Set<UUID> getUUIDs(); @Override int findEntry(long msb, long lsb); @Override int size(); @Override int count(); @Override IndexEntryV2 entry(int i);  }
@Test public void testEntry() throws Exception { Buffer buffer = Buffer.allocate(IndexEntryV2.SIZE); buffer.duplicate() .putLong(1).putLong(2).putInt(3).putInt(4).putInt(5).putInt(6).put((byte) 1); IndexEntryV2 entry = new IndexV2(buffer).entry(0); assertEquals(1, entry.getMsb()); assertEquals(2, entry.getLsb()); assertEquals(3, entry.getPosition()); assertEquals(4, entry.getLength()); assertEquals(5, entry.getGeneration()); assertEquals(6, entry.getFullGeneration()); assertEquals(true, entry.isCompacted()); }