@Test
  public void testIOErrorAndBlobNotFoundInOriginDcCase1() throws Exception {
    assumeTrue(operationTrackerType.equals(AdaptiveOperationTracker.class.getSimpleName()));
    correlationIdToGetOperation.clear();

    // Pick a remote DC as the new local DC.
    String newLocal = "DC1";
    String oldLocal = localDcName;
    Properties props = getNonBlockingRouterProperties(true);
    props.setProperty("router.datacenter.name", newLocal);
    props.setProperty("router.operation.tracker.check.all.originating.replicas.for.not.found", Boolean.toString(true));
    routerConfig = new RouterConfig(new VerifiableProperties(props));

    for (MockServer server : mockServerLayout.getMockServers()) {
      if (server.getDataCenter().equals(oldLocal)) {
        // for origin DC, always return Blob_Not_Found;
        server.setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
      } else {
        // otherwise, return IO_Error.
        server.setServerErrorForAllRequests(ServerErrorCode.IOError);
      }
    }

    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<>());
    AdaptiveOperationTracker tracker = (AdaptiveOperationTracker) op.getOperationTrackerInUse();

    completeOp(op);
    RouterException routerException = (RouterException) op.getOperationException();
    // error code should be OperationTimedOut because it precedes BlobDoesNotExist
    Assert.assertEquals(RouterErrorCode.BlobDoesNotExist, routerException.getErrorCode());
    // localReplica now becomes remote replica.
    Assert.assertEquals("The number of data points in remote colo latency histogram is not expected", 3,
        tracker.getLatencyHistogram(localReplica).getCount());

    props = getNonBlockingRouterProperties(true);
    props.setProperty("router.datacenter.name", oldLocal);
    routerConfig = new RouterConfig(new VerifiableProperties(props));
  }
Test the case where origin replicas return Blob_Not_found and the rest returns IO_Error.
Case 1: When we wait for all originating DC replicas to return Blob_Not_Found before terminating operation.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/GetBlobInfoOperationTest.java