@Test
  public void putOperationSuccessTest() throws Exception {
    primeTracker(putLocalColoTracker, MIN_DATA_POINTS_REQUIRED, LOCAL_COLO_LATENCY_RANGE);
    double localColoCutoff = putLocalColoTracker.getSnapshot().getValue(QUANTILE);
    OperationTracker ot =
        getOperationTracker(createRouterConfig(true, 2, 2, 6, null, true), mockPartition, RouterOperation.PutOperation);
    sendRequests(ot, 2);
    // sleep for less than the cutoff
    time.sleep((long) localColoCutoff - 2);
    sendRequests(ot, 0);

    // Acknowledging one success shouldn't change the state of the operation tracker
    ot.onResponse(partitionAndInflightReplicas.get(mockPartition).pollLast(), TrackedRequestFinalState.SUCCESS);
    sendRequests(ot, 0);
    // push it over the edge
    time.sleep(5);
    sendRequests(ot, 1);

    ot.onResponse(partitionAndInflightReplicas.get(mockPartition).pollLast(), TrackedRequestFinalState.SUCCESS);

    assertTrue("Operation should be done", ot.isDone());
    assertTrue("Operation should have succeeded", ot.hasSucceeded());
    assertEquals("Past due counter is inconsistent", 1, putPastDueCounter.getCount());
  }
Test that PutOperation can use adaptive operation tracker.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/AdaptiveOperationTrackerTest.java