private void doTtlUpdateSrcDupTest() throws Exception {
    // close/crash after the first log segment is switched out, this is mocked by closing compactor immediately after
    // dropping first log segment
    long expiryTimeMs = createStateWithPutTtlUpdateAndDelete();
    state.advanceTime(TimeUnit.SECONDS.toMillis(1));
    List<LogSegmentName> segmentsUnderCompaction = getLogSegments(0, state.index.getLogSegmentCount() - 1);
    Log log = new InterruptionInducingLog(Integer.MAX_VALUE, 1);
    compactWithRecoveryAndVerify(log, DISK_IO_SCHEDULER, state.index, segmentsUnderCompaction, expiryTimeMs, true,
        true);
  }
Tests the case where close/crash creates a situation where duplicates will be detected during the search for copy
candidates in the srcIndex
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java