private void verifyEquality(CompactionDetails original, CompactionDetails toCheck) {
    assertEquals("Reference time does not match", original.getReferenceTimeMs(), toCheck.getReferenceTimeMs());
    assertEquals("Segments under compaction don't match", original.getLogSegmentsUnderCompaction(),
        toCheck.getLogSegmentsUnderCompaction());
    if (CompactionDetails.CURRENT_VERSION == CompactionDetails.VERSION_1) {
      assertEquals("IsFullRange does not match", original.isFullRange(), toCheck.isFullRange());
    } else {
      assertFalse("IsFullRange does not match", toCheck.isFullRange());
    }
  }
Verifies that two {@link CompactionDetails} instances are equal.
@param original the expected {@link CompactionDetails}.
@param toCheck the {@link CompactionDetails} that needs to be checked.
ambry-store/src/test/java/com/github/ambry/store/CompactionDetailsTest.java