private List<LogSegmentName> setUpStateForStatsBasedCompactionPolicy(MockBlobStore blobStore,
      MockBlobStoreStats mockBlobStoreStats) {
    long maxLogSegmentCapacity =
        blobStore.segmentCapacity - blobStore.segmentHeaderSize - mockBlobStoreStats.getMaxBlobSize();
    long logSegmentCount = blobStore.capacityInBytes / blobStore.segmentCapacity;
    blobStore.logSegmentsNotInJournal = generateRandomLogSegmentName((int) logSegmentCount);

    int bestCandidateRange = 3 + TestUtils.RANDOM.nextInt((int) logSegmentCount - 2);
    int bestCandidateStartIndex = TestUtils.RANDOM.nextInt((int) logSegmentCount - bestCandidateRange + 1);
    int bestCandidateEndIndex = bestCandidateStartIndex + bestCandidateRange - 1;

    List<LogSegmentName> bestCandidates =
        blobStore.logSegmentsNotInJournal.subList(bestCandidateStartIndex, bestCandidateEndIndex + 1);
    long bestCost = maxLogSegmentCapacity / bestCandidates.size();
    // this best cost is to ensure that no of segments reclaimed will be "bestCandidates" count - 1
    NavigableMap<LogSegmentName, Long> validDataSize =
        generateValidDataSize(blobStore.logSegmentsNotInJournal, bestCandidates, bestCost, maxLogSegmentCapacity);
    mockBlobStoreStats.validDataSizeByLogSegments = validDataSize;
    return bestCandidates;
  }
Sets up the state (like logSegemntsNotInJournal and valid data size map) for
{@link StatsBasedCompactionPolicy}
@return a {@link List} of log segment names referring to the best candidate to compact
ambry-store/src/test/java/com/github/ambry/store/CompactionPolicyTest.java