private void sendRequests(OperationTracker operationTracker, int numRequestsExpected) {
    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",
          repetitionTracker.contains(nextReplica));
      LinkedList<ReplicaId> infightReplicas =
          partitionAndInflightReplicas.getOrDefault(nextReplica.getPartitionId(), new LinkedList<>());
      infightReplicas.offer(nextReplica);
      partitionAndInflightReplicas.put(nextReplica.getPartitionId(), infightReplicas);
      repetitionTracker.add(nextReplica);
      replicaIdIterator.remove();
      sent++;
    }
    assertEquals("Did not send expected number of requests", 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.
ambry-router/src/test/java/com/github/ambry/router/AdaptiveOperationTrackerTest.java