@Test
  public void testDifferentThresholdsForMinLogSizeToCompact() throws Exception {

    int[] minLogSizeToTriggerCompactionInPercentages = new int[]{10, 20, 35, 40, 50, 59, 60, 61, 65, 70, 80, 95};
    // when used capacity(60%) is <= (minLogSize) % of total capacity, compactionDetails is expected to be null.
    // If not, logSegmentsNotInJournal needs to be returned
    List<LogSegmentName> bestCandidates = null;
    for (int minLogSize : minLogSizeToTriggerCompactionInPercentages) {
      initializeBlobStore(properties, time, minLogSize, -1, DEFAULT_MAX_BLOB_SIZE);
      if (compactionPolicy instanceof StatsBasedCompactionPolicy) {
        bestCandidates = setUpStateForStatsBasedCompactionPolicy(blobStore, mockBlobStoreStats);
      } else if (compactionPolicy instanceof CompactAllPolicy) {
        blobStore.logSegmentsNotInJournal = generateRandomLogSegmentName(3);
        bestCandidates = blobStore.logSegmentsNotInJournal;
      }
      if (blobStore.usedCapacity < (config.storeMinUsedCapacityToTriggerCompactionInPercentage / 100.0
          * blobStore.capacityInBytes)) {
        verifyCompactionDetails(null, blobStore, compactionPolicy);
      } else {
        verifyCompactionDetails(
            new CompactionDetails(time.milliseconds() - messageRetentionTimeInMs, bestCandidates, null), blobStore,
            compactionPolicy);
      }
    }
  }
Tests {@link CompactionManager#getCompactionDetails(BlobStore)} for different values for
{@link StoreConfig#storeMinUsedCapacityToTriggerCompactionInPercentage}
ambry-store/src/test/java/com/github/ambry/store/CompactionPolicyTest.java