private void assertFailure(Exception expectedException, boolean testNotifications) {
    for (RequestAndResult requestAndResult : requestAndResultsList) {
      try {
        String blobId = requestAndResult.result.join();
        Assert.fail("Excepting a failure");
      } catch (Exception e) {
        Exception exception = Utils.extractFutureExceptionCause(e);
        Assert.assertNotNull("exception should not be null", exception);
        Assert.assertTrue("Exception received should be the expected Exception",
            exceptionsAreEqual(expectedException, exception));
      }
    }
    if (testNotifications) {
      notificationSystem.verifyNotificationsForFailedPut();
    }
  }
Go through all the requests and ensure all of them have failed.
@param expectedException expected exception
@param testNotifications {@code true} to test that notifications for successfully put data chunks are received.
ambry-router/src/test/java/com/github/ambry/router/PutManagerTest.java