public TimestampOffset lastEntry() {
        return lastEntry;
    }
@Test
    public void testLastEntry() {
        assertEquals(new TimestampOffset(RecordBatch.NO_TIMESTAMP, baseOffset), idx.lastEntry());
        idx.maybeAppend(1, 1 + baseOffset);
        assertEquals(new TimestampOffset(1, baseOffset + 1), idx.lastEntry());
    }