private void verifyNoChangeInEndOffsets(Map<LogSegmentName, Long> oldSegmentNamesAndEndOffsets) {
    for (Map.Entry<LogSegmentName, Long> nameAndEndOffset : oldSegmentNamesAndEndOffsets.entrySet()) {
      // there should be a segment with the higher gen
      LogSegmentName oldSegmentName = nameAndEndOffset.getKey();
      assertNull("Old segment should not exist", state.log.getSegment(oldSegmentName));
      LogSegmentName newSegmentName = oldSegmentName.getNextGenerationName();
      LogSegment newSegment = state.log.getSegment(newSegmentName);
      assertNotNull("New segment should exist", newSegment);
      assertEquals("End offset of new segment does not match that of the old segment",
          nameAndEndOffset.getValue().longValue(), newSegment.getEndOffset());
    }
  }
Verifies that the new log segments created by compacting the old log segments have the same end offsets.
@param oldSegmentNamesAndEndOffsets the names and end offsets of the old log segments.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java