private Pair<Long, List<LogSegmentName>> setupStateWithExpiredBlobsAtSpecificTime() throws Exception {
    refreshState(false, true, false);
    // we want at least 3 log segments that are outside the journal and with no invalid records
    long extraSegmentCountRequired = 4;
    // send +1 to account for half filled segments from curated log-index state.
    long expiryTimeMs = getInvalidationTime(extraSegmentCountRequired + 1);

    long currentLogSegmentCount = state.index.getLogSegmentCount();
    writeDataToMeetRequiredSegmentCount(currentLogSegmentCount + extraSegmentCountRequired,
        Collections.singletonList(expiryTimeMs));
    List<LogSegmentName> segmentsUnderCompaction =
        getLogSegments(currentLogSegmentCount, extraSegmentCountRequired - 1);
    // reload index to make sure journal is on only the latest log segment
    state.reloadIndex(true, false);
    return new Pair<>(expiryTimeMs, segmentsUnderCompaction);
  }
Sets up state where a fixed number of log segments are written and a fraction of the blobs in these log segments
expire at a time returned by the function.
@return a {@link Pair} that contains the time at which the blobs will expire and the list of segments that should
be compacted.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java