private void testVariousErrors(String dcWherePutHappened) throws Exception {
    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<>());

    ArrayList<MockServer> mockServers = new ArrayList<>(mockServerLayout.getMockServers());
    // set the status to various server level or partition level errors (not Blob_Deleted or Blob_Expired).
    mockServers.get(0).setServerErrorForAllRequests(ServerErrorCode.UnknownError);
    mockServers.get(1).setServerErrorForAllRequests(ServerErrorCode.UnknownError);
    mockServers.get(2).setServerErrorForAllRequests(ServerErrorCode.IOError);
    mockServers.get(3).setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
    mockServers.get(4).setServerErrorForAllRequests(ServerErrorCode.DataCorrupt);
    mockServers.get(5).setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
    mockServers.get(6).setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
    mockServers.get(7).setServerErrorForAllRequests(ServerErrorCode.DiskUnavailable);
    mockServers.get(8).setServerErrorForAllRequests(ServerErrorCode.UnknownError);

    // clear the hard error in one of the servers in the datacenter where the put happened.
    for (MockServer mockServer : mockServers) {
      if (mockServer.getDataCenter().equals(dcWherePutHappened)) {
        mockServer.setServerErrorForAllRequests(ServerErrorCode.NoError);
        break;
      }
    }
    completeOp(op);
    assertSuccess(op, (short) 0);
  }
Test the case with multiple errors (server level and partition level) from multiple servers,
with just one server returning a successful response. The operation should succeed.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/GetBlobInfoOperationTest.java