private void sendRequests(OperationTracker operationTracker, int numRequestsExpected, boolean skipAlternate) {
    int counter = 0;
    int sent = 0;
    Iterator<ReplicaId> replicaIdIterator = operationTracker.getReplicaIterator();
    while (replicaIdIterator.hasNext()) {
      ReplicaId nextReplica = replicaIdIterator.next();
      assertNotNull("There should be a replica to send a request to", nextReplica);
      assertFalse("Replica that was used for a request returned by iterator again: " + nextReplica,
          repetitionTracker.contains(nextReplica));
      if (!skipAlternate || counter % 2 == 0) {
        inflightReplicas.offer(nextReplica);
        replicaIdIterator.remove();
        repetitionTracker.add(nextReplica);
        sent++;
      }
      counter++;
    }
    assertEquals("Did not send expected number of requests: " + inflightReplicas, numRequestsExpected, sent);
  }
Send requests to all replicas provided by the {@link OperationTracker#getReplicaIterator()}
@param operationTracker the {@link OperationTracker} that provides replicas.
@param numRequestsExpected the number of requests expected to be sent out.
@param skipAlternate {@code true} if alternate {@link ReplicaId} instances from the iterator have to be skipped
                                 (i.e. no requests sent).
ambry-router/src/test/java/com/github/ambry/router/OperationTrackerTest.java