private List<LogEntry> getValidLogEntriesInOrder(List<LogSegmentName> logSegmentsUnderConsideration,
      long deleteReferenceTimeMs, Pair<Set<MockId>, Set<MockId>> expiredDeletes, boolean invalidateExpiredDelete) {
    List<LogEntry> validLogEntriesInOrder = new ArrayList<>();
    for (LogSegmentName logSegment : logSegmentsUnderConsideration) {
      List<IndexEntry> validIndexEntries =
          state.getValidIndexEntriesForLogSegment(state.log.getSegment(logSegment), deleteReferenceTimeMs,
              state.time.milliseconds(), getFileSpanForLogSegments(logSegmentsUnderConsideration),
              new DeleteTombstoneStats.Builder(state.time), expiredDeletes, invalidateExpiredDelete);
      addToLogEntriesInOrder(validIndexEntries, validLogEntriesInOrder);
    }
    return validLogEntriesInOrder;
  }
Gets all the valid log entries in {@code logSegmentsUnderConsideration} in order of their occurrence in the log.
@param logSegmentsUnderConsideration the log segments whose log entries are required.
@param deleteReferenceTimeMs the reference time in ms to use to decide whether deletes are valid.
@param expiredDeletes a pair of two sets of deletes. The first one contains expired delete tombstones (with no
                     associated PUT); the second one includes expired deletes currently with PUTs ahead of them.
@param invalidateExpiredDelete whether to invalidate expired delete.
@return the valid log entries in {@code logSegmentsUnderConsideration} in order of their occurrence in the log.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java