private Map<LogSegmentName, Long> getEndOffsets(List<LogSegmentName> logSegmentNames) {
    Map<LogSegmentName, Long> oldSegmentNamesAndEndOffsets = new HashMap<>();
    for (LogSegmentName segmentUnderCompaction : logSegmentNames) {
      oldSegmentNamesAndEndOffsets.put(segmentUnderCompaction,
          state.log.getSegment(segmentUnderCompaction).getEndOffset());
    }
    return oldSegmentNamesAndEndOffsets;
  }
Gets the end offsets of all the {@code logSegmentNames}.
@param logSegmentNames the names of the log segments whose
@return a map of log segment names to end offsets.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java