static NavigableMap<LogSegmentName, Long> generateValidDataSize(List<LogSegmentName> logSegmentNames,
      List<LogSegmentName> bestCandidates, long validDataSizeForBest, long maxLogSegmentCapacity) {
    NavigableMap<LogSegmentName, Long> validDataSize = new TreeMap<>();
    for (LogSegmentName logSegmentName : logSegmentNames) {
      if (bestCandidates.contains(logSegmentName)) {
        validDataSize.put(logSegmentName, validDataSizeForBest);
      } else {
        validDataSize.put(logSegmentName, maxLogSegmentCapacity);
      }
    }
    return validDataSize;
  }
Generates valid data size map for given segments
@param logSegmentNames {@link List<String>} of log segment names
@param bestCandidates {@link List<String>} of best candidates
@param validDataSizeForBest valid data size to be set for best candidate
@return a {@link NavigableMap} of log segment name to valid data size
ambry-store/src/test/java/com/github/ambry/store/CompactionPolicyTest.java