private long getValidDataSize(List<LogSegmentName> logSegments, long deleteReferenceTimeMs,
      boolean invalidateExpiredDelete) {
    long size = 0;
    Pair<Set<MockId>, Set<MockId>> expiredDeletes = new Pair<>(new HashSet<>(), new HashSet<>());
    for (LogSegmentName segment : logSegments) {
      long logSegmentValidSize =
          state.getValidDataSizeForLogSegment(state.log.getSegment(segment), deleteReferenceTimeMs,
              state.time.milliseconds(), getFileSpanForLogSegments(logSegments),
              new DeleteTombstoneStats.Builder(state.time), expiredDeletes, invalidateExpiredDelete);
      size += logSegmentValidSize;
    }
    return size;
  }
Gets the sum of size of valid data in {@code logSegments} at {@code deleteReferenceTimeMs}.
@param logSegments the names of log segments whose sum of size of valid data is required.
@param deleteReferenceTimeMs the reference time in ms to use to decide whether deletes are valid.
@param invalidateExpiredDelete whether to invalidate expired delete.
@return the sum of size of valid data in {@code logSegments} at {@code deleteReferenceTimeMs}.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java