@Test
  public void testGetCompactionDetailsTest() throws StoreException {
    blobStore.logSegmentsNotInJournal = CompactionPolicyTest.generateRandomLogSegmentName(1);
    CompactionPolicyTest.verifyCompactionDetails(
        new CompactionDetails(time.milliseconds() - messageRetentionTimeInMs, blobStore.logSegmentsNotInJournal, null),
        blobStore, compactionPolicy);

    // random no of valid logSegments
    for (int i = 0; i < 3; i++) {
      int logSegmentCount = TestUtils.RANDOM.nextInt(10) + 1;
      blobStore.logSegmentsNotInJournal = CompactionPolicyTest.generateRandomLogSegmentName(logSegmentCount);
      CompactionPolicyTest.verifyCompactionDetails(
          new CompactionDetails(time.milliseconds() - messageRetentionTimeInMs, blobStore.logSegmentsNotInJournal,
              null), blobStore, compactionPolicy);
    }
  }
Tests {@link CompactionManager#getCompactionDetails(BlobStore)}
@throws StoreException
@throws InterruptedException
ambry-store/src/test/java/com/github/ambry/store/CompactAllPolicyTest.java