private List<LogSegmentName> getUnaffectedSegments(List<LogSegmentName> segmentsUnderCompaction) {
    List<LogSegmentName> unaffectedSegments = new ArrayList<>();
    LogSegment segment = state.log.getFirstSegment();
    while (segment != null) {
      if (!segmentsUnderCompaction.contains(segment.getName())) {
        unaffectedSegments.add(segment.getName());
      }
      segment = state.log.getNextSegment(segment);
    }
    return unaffectedSegments;
  }
Gets the list of segments in the log but not in {@code segmentsUnderCompaction}.
@param segmentsUnderCompaction the names of the log segments under compaction.
@return the list of segments in the log but not in {@code segmentsUnderCompaction}.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java