private void checkVitals(boolean changeExpected, long originalLogSegmentSizeSum, long originalLogSegmentCount,
      long originalIndexSegmentCount) {
    if (changeExpected) {
      // Compaction remove some of the records in the log, so the end of the compacted log should be less than the
      // original one.
      assertTrue("Compaction did not cause in change in sum of log segment sizes",
          originalLogSegmentSizeSum > getSumOfLogSegmentEndOffsets());
    } else {
      assertEquals("Sum of log segment capacities changed after compaction", originalLogSegmentSizeSum,
          getSumOfLogSegmentEndOffsets());
      assertEquals("Log segment count changed after compaction", originalLogSegmentCount,
          state.index.getLogSegmentCount());
      assertEquals("Index segment count changed after compaction", originalIndexSegmentCount,
          state.index.getIndexSegments().size());
    }
  }
Checks some vitals of the store. If change is expected checks that the sum of end offsets of all the log segments
has changed and is lesser than what it was before. If no change was expected, checks that the sum, count of log
and index segments is the same as before.
@param changeExpected {@code true} if change in log segment end offset sum is expected. {@code false} otherwise.
@param originalLogSegmentSizeSum the sum of end offsets of all the log segments before compaction.
@param originalLogSegmentCount the number of log segments before compaction.
@param originalIndexSegmentCount the number of index segments before compaction.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java