@Test
  public void testDifferentMessageRetentionDays() throws Exception {
    List<LogSegmentName> bestCandidates = null;
    int[] messageRetentionHoursValues = new int[]{1, 2, 3, 6, 9};
    for (int messageRetentionHours : messageRetentionHoursValues) {
      time = new MockTime();
      Pair<MockBlobStore, StoreConfig> initState =
          initializeBlobStore(properties, time, -1, messageRetentionHours * 60, DEFAULT_MAX_BLOB_SIZE);
      if (compactionPolicy instanceof StatsBasedCompactionPolicy) {
        bestCandidates = setUpStateForStatsBasedCompactionPolicy(blobStore, mockBlobStoreStats);
        compactionPolicy = new StatsBasedCompactionPolicy(initState.getSecond(), time);
      } else if (compactionPolicy instanceof CompactAllPolicy) {
        blobStore.logSegmentsNotInJournal = generateRandomLogSegmentName(3);
        bestCandidates = blobStore.logSegmentsNotInJournal;
        compactionPolicy = new CompactAllPolicy(initState.getSecond(), time);
      }
      verifyCompactionDetails(
          new CompactionDetails(time.milliseconds() - TimeUnit.HOURS.toMillis(messageRetentionHours * 60),
              bestCandidates, null), blobStore, compactionPolicy);
    }
  }
Tests {@link CompactionManager#getCompactionDetails(BlobStore)} for different values for
{@link StoreConfig#storeDeletedMessageRetentionMinutes}
ambry-store/src/test/java/com/github/ambry/store/CompactionPolicyTest.java