@Test
  public void testRouterRequestTimeoutAllFailure() {
    router.currentOperationsCount.incrementAndGet();
    GetBlobInfoOperation op =
        new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobId, options, null,
            routerCallback, kms, cryptoService, cryptoJobHandler, time, false, quotaChargeCallback, router);
    requestRegistrationCallback.setRequestsToSend(new ArrayList<>());
    op.poll(requestRegistrationCallback);
    while (!op.isOperationComplete()) {
      time.sleep(routerConfig.routerRequestTimeoutMs + 1);
      op.poll(requestRegistrationCallback);
    }
    // At this time requests would have been created for all replicas, as none of them were delivered,
    // and cross-colo proxying is enabled by default.
    Assert.assertEquals("Must have attempted sending requests to all replicas", replicasCount,
        correlationIdToGetOperation.size());
    Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete());
    RouterException routerException = (RouterException) op.getOperationException();
    Assert.assertEquals(RouterErrorCode.OperationTimedOut, routerException.getErrorCode());
    // test that time out response shouldn't update the Histogram if exclude timeout is enabled
    assumeTrue(operationTrackerType.equals(AdaptiveOperationTracker.class.getSimpleName()));
    AdaptiveOperationTracker tracker = (AdaptiveOperationTracker) op.getOperationTrackerInUse();
    Assert.assertEquals("Timed-out response shouldn't be counted into local colo latency histogram", 0,
        tracker.getLatencyHistogram(localReplica).getCount());
    Assert.assertEquals("Timed-out response shouldn't be counted into cross colo latency histogram", 0,
        tracker.getLatencyHistogram(remoteReplica).getCount());
  }
Test the case where all requests time out at router layer within the GetOperation.
ambry-router/src/test/java/com/github/ambry/router/GetBlobInfoOperationTest.java