private boolean indexBasedTokenPointsToLastEntryOfLastIndexSegment(StoreFindToken token,
      ConcurrentSkipListMap<Offset, IndexSegment> indexSegments) {
    StoreKey storeKey = token.getStoreKey();
    IndexSegment lastIndexSegment = indexSegments.lastEntry().getValue();
    if (token.getOffset().equals(lastIndexSegment.getStartOffset())) {
      StoreKey lastEntryInLastIndexSegment = lastIndexSegment.listIterator(lastIndexSegment.size()).previous().getKey();
      logger.trace("DataDir {}: StoreKey for token {} is {}, StoreKey in last index segment is {}", dataDir, token,
          storeKey, lastEntryInLastIndexSegment);
      return lastEntryInLastIndexSegment.equals(storeKey);
    }
    return false;
  }
Check if the index based token has pointed to the last entry of the last index segment.
@param token the {@link StoreFindToken} need to be checked.
@param indexSegments the map of index segment start {@link Offset} to {@link IndexSegment} instances.
@return {@code true} if the token points to the last entry of last index segment. Otherwise return {@code false}.
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java