@Test
  public void remoteReplicaTest() {
    initialize();
    OperationTracker ot = getOperationTrackerForGetOrPut(true, 1, 2, RouterOperation.GetBlobOperation, true);
    // 3-0-0-0; 9-0-0-0
    sendRequests(ot, 2, false);
    // 1-2-0-0; 9-0-0-0
    ReplicaId id = inflightReplicas.poll();
    assertEquals("First request should have been to local DC", localDcName, id.getDataNodeId().getDatacenterName());
    ot.onResponse(id, TrackedRequestFinalState.FAILURE);
    // 1-1-0-1; 9-0-0-0
    assertFalse("Operation should not be done", ot.isDone());
    sendRequests(ot, 1, false);
    // 0-2-0-1; 9-0-0-0
    id = inflightReplicas.poll();
    assertEquals("Second request should have been to local DC", localDcName, id.getDataNodeId().getDatacenterName());
    ot.onResponse(id, TrackedRequestFinalState.FAILURE);
    id = inflightReplicas.poll();
    assertEquals("Third request should have been to local DC", localDcName, id.getDataNodeId().getDatacenterName());
    ot.onResponse(id, TrackedRequestFinalState.FAILURE);
    // 0-0-0-3; 9-0-0-0
    assertFalse("Operation should not be done", ot.isDone());
    sendRequests(ot, 2, false);
    // 0-0-0-3; 7-2-0-0
    assertFalse("Operation should not be done", ot.isDone());
    for (int i = 0; i < 2; i++) {
      ot.onResponse(inflightReplicas.poll(), TrackedRequestFinalState.FAILURE);
    }
    // 0-0-0-3; 7-0-0-2
    assertFalse("Operation should not be done", ot.isDone());
    sendRequests(ot, 2, false);
    // 0-0-0-3; 5-2-0-2
    ot.onResponse(inflightReplicas.poll(), TrackedRequestFinalState.FAILURE);
    assertFalse("Operation should not be done", ot.isDone());
    // 0-0-0-3; 5-1-0-3
    sendRequests(ot, 1, false);
    // 0-0-0-3; 4-1-0-3
    ot.onResponse(inflightReplicas.poll(), TrackedRequestFinalState.SUCCESS);
    assertTrue("Operation should have succeeded", ot.hasSucceeded());
    assertTrue("Operation should be done", ot.isDone());
  }
crossColoEnabled = true, successTarget = 1, parallelism = 2.
<p/>
1. Get 2 local replicas to send request (and send requests);
2. 1 local replica fails, 1 pending.
3. Get 1 more local replicas to send request (and send requests);
4. 2 local replica fails.
5. Get 1 remote replica from each Dc to send request (and send requests);
6. All fails.
7. Get 1 remote replica from each DC to send request (and send requests);
8. 1 fails, 2 pending.
9. Get 1 remote replica from each DC to send request (and send requests);
10. 2 fails.
11. 1 succeeds.
12. Operation succeeds.
ambry-router/src/test/java/com/github/ambry/router/OperationTrackerTest.java