private void verifyHistogramRecording(OperationTracker ot, boolean succeedRequests, long timeIncrement,
      Double[] expectedAverages, Histogram tracker) throws InterruptedException {
    for (double expectedAverage : expectedAverages) {
      time.sleep(timeIncrement);
      ot.onResponse(partitionAndInflightReplicas.get(mockPartition).poll(),
          succeedRequests ? TrackedRequestFinalState.SUCCESS : TrackedRequestFinalState.FAILURE);
      assertEquals("Average does not match. Histogram recording may be incorrect", expectedAverage,
          tracker.getSnapshot().getMean(), 0.001);
    }
  }
Verifies that the {@code tracker} is updated correctly when responses are received.
@param ot the {@link OperationTracker} to use.
@param succeedRequests {@code true} if the requests should receive successful responses. {@code false} otherwise.
@param timeIncrement increment of time (in ms) before responses are recorded for each request.
@param expectedAverages the expected averages after every response that is recorded.
@param tracker the {@link Histogram} that should be updated.
@throws InterruptedException
ambry-router/src/test/java/com/github/ambry/router/AdaptiveOperationTrackerTest.java