private void assertFailureAndCheckErrorCode(GetBlobOperation op, RouterErrorCode expectedError) {
    Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete());
    RouterException routerException = (RouterException) op.getOperationException();
    if (routerException == null) {
      Assert.fail("Expected getBlobOperation to fail");
    }
    Assert.assertEquals(expectedError, routerException.getErrorCode());
  }
Check that an operation is complete and assert that it has failed with the specified {@link RouterErrorCode} set.
@param op The operation to check.
@param expectedError The error code expected.
ambry-router/src/test/java/com/github/ambry/router/GetBlobOperationTest.java