private List<LogSegmentName> getExpectedLogSegmentNames(int segmentsToIgnoreFromLast) {
    List<LogSegmentName> expectedLogSegments = new ArrayList<>();
    LogSegment logSegment = state.log.getFirstSegment();
    while (logSegment != null) {
      expectedLogSegments.add(logSegment.getName());
      logSegment = state.log.getNextSegment(logSegment);
    }
    return expectedLogSegments.subList(0, expectedLogSegments.size() - segmentsToIgnoreFromLast);
  }
Fetch expected log segment names ignoring the last {@code segmentsToIgnoreFromLast} from the list
of actual log segments in the log
@param segmentsToIgnoreFromLast number of log segments to be ignored from the last
@return a {@link List} of log segments
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java