private void assertFailureAndCheckErrorCode(Future<Void> future, RouterErrorCode expectedError) {
    try {
      future.get(AWAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
      fail("Deletion should be unsuccessful. Exception is expected.");
    } catch (Exception e) {
      assertEquals("RouterErrorCode should be " + expectedError, expectedError,
          ((RouterException) e.getCause()).getErrorCode());
    }
  }
Check that a delete operation has failed with a router exception with the specified error code.
@param future the {@link Future} for the delete operation
@param expectedError the expected {@link RouterErrorCode}
ambry-router/src/test/java/com/github/ambry/router/DeleteManagerTest.java