@Test
  public void rebuildTokenWhenInputJournalBasedTokenTestCase2() throws StoreException {
    assumeTrue(isLogSegmented);
    IndexSegment lastIndexSegment = stateForTokenTest.index.getIndexSegments().lastEntry().getValue();
    Offset validOffset = stateForTokenTest.index.journal.getLastOffset();
    StoreFindToken startToken =
        new StoreFindToken(validOffset, stateForTokenTest.sessionId, stateForTokenTest.incarnationId, false,
            lastIndexSegment.getResetKey(), lastIndexSegment.getResetKeyType(),
            lastIndexSegment.getResetKeyLifeVersion());
    FindInfo findInfo = stateForTokenTest.index.findEntriesSince(startToken, 1);
    StoreFindToken token = (StoreFindToken) findInfo.getFindToken();
    StoreFindToken expectedToken = startToken;
    compareTokens(expectedToken, token);
  }
Test generating the last journal based token, it will return the original token.
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java