private List<LogSegmentName> getLogSegments(long startPos, long count) {
    List<LogSegmentName> segmentsUnderCompaction = new ArrayList<>();
    LogSegment segment = state.log.getFirstSegment();
    int idx = 0;
    while (segmentsUnderCompaction.size() < count) {
      if (idx >= startPos) {
        segmentsUnderCompaction.add(segment.getName());
      }
      segment = state.log.getNextSegment(segment);
      idx++;
    }
    return segmentsUnderCompaction;
  }
Gets {@code count} number of log segments starting at position {@code startPos} (inclusive and indexed on 0).
<p/>
For e.g., to get the first two log segments, the call would be getLogSegments(0, 2).
@param startPos the position of the first log segment required (inclusive and indexed on 0).
@param count number of log segments require.
@return {@code count} number of log segments starting at position {@code startPos} (inclusive and indexed on 0).
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java