public TimestampOffset entry(int n) {
        return maybeLock(lock, () -> {
            if (n >= entries())
                throw new IllegalArgumentException("Attempt to fetch the " + n + "th entry from time index "
                    + file().getAbsolutePath() + " which has size " + entries());
            return parseEntry(mmap(), n);
        });
    }
@Test
    public void testEntry() {
        appendEntries(maxEntries - 1);
        assertEquals(new TimestampOffset(10L, 55L), idx.entry(0));
        assertEquals(new TimestampOffset(20L, 65L), idx.entry(1));
        assertEquals(new TimestampOffset(30L, 75L), idx.entry(2));
        assertEquals(new TimestampOffset(40L, 85L), idx.entry(3));
    }