@Test
  public void successTest() {
    initialize();
    UndeleteOperationTracker tracker = getOperationTracker(3);
    assertFalse("Operation should not have been done", tracker.isDone());
    int counter = 0;
    while (!tracker.hasSucceeded()) {
      if (inflightReplicas.isEmpty()) {
        sendRequests(tracker, 3);
      }
      tracker.onResponse(inflightReplicas.poll(), TrackedRequestFinalState.SUCCESS);
      counter++;
    }
    assertTrue("Operation should have be done", tracker.isDone());
    assertFalse("Operation should not failed", tracker.hasFailed());
    assertTrue("Operation should at least send out 8 requests", counter >= 8);
  }
Test when all the responses are success.
ambry-router/src/test/java/com/github/ambry/router/UndeleteOperationTrackerTest.java