@Test
  public void findEntriesSinceTest() throws StoreException {
    // add some more entries so that the journal gets entries across segments and doesn't start at the beginning
    // of an index segment.
    state.addPutEntries(7, CuratedLogIndexState.PUT_RECORD_SIZE, Utils.Infinite_Time);
    state.addDeleteEntry(state.getIdToDeleteFromIndexSegment(state.referenceIndex.lastKey(), false));

    // token with log end offset should not return anything
    StoreFindToken token =
        new StoreFindToken(state.log.getEndOffset(), state.sessionId, state.incarnationId, false, null, null,
            UNINITIALIZED_RESET_KEY_VERSION);
    token.setBytesRead(state.index.getLogUsedCapacity());
    doFindEntriesSinceTest(token, Long.MAX_VALUE, Collections.emptySet(), token);

    findEntriesSinceToIndexBasedTest();
    findEntriesSinceToJournalBasedTest();
    findEntriesSinceOneByOneTest();
    findEntriesSinceIndexBasedTokenForOffsetInJournalTest();

    // error case - can never have provided an index based token that is contains the offset of the last segment
    token = new StoreFindToken(state.referenceIndex.lastEntry().getValue().firstKey(), state.referenceIndex.lastKey(),
        state.sessionId, state.incarnationId, null, null, UNINITIALIZED_RESET_KEY_VERSION);
    doFindEntriesSinceFailureTest(token, StoreErrorCodes.UnknownError);

    findEntriesSinceInEmptyIndexTest(false);
    findEntriesSinceTtlUpdateCornerCaseTest();
    findEntriesSinceTtlUpdateAndPutInJournalTest();
  }
Tests {@link PersistentIndex#findEntriesSince(FindToken, long)} for various cases
1. All cases that result in getting an index based token
2. All cases that result in getting a journal based token
3. Getting entries one by one
4. Getting entries using an index based token for an offset in the journal
5. Error case - trying to findEntriesSince() using an index based token that contains the last index segment
6. Using findEntriesSince() in an empty index
7. Token that has the log end offset
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java