IndexV1 implements Index { @Override public int size() { return entries.remaining() + FOOTER_SIZE; } IndexV1(Buffer entries); @Override Set<UUID> getUUIDs(); @Override int findEntry(long msb, long lsb); @Override int size(); @Override int count(); @Override IndexEntryV1 entry(int i);  }
@Test public void testSize() throws Exception { Buffer buffer = Buffer.allocate(IndexEntryV1.SIZE); buffer.duplicate() .putLong(1).putLong(2).putInt(3).putInt(4).putInt(5); assertEquals(IndexEntryV1.SIZE + IndexV1.FOOTER_SIZE, new IndexV1(buffer).size()); }