private void createAccountWithBadContainersAndFail(List<Container> containers,
      Class<? extends Exception> exceptionClass) throws Exception {
    TestUtils.assertException(exceptionClass,
        () -> new Account(refAccountId, refAccountName, refAccountStatus, refAccountAclInheritedByContainer,
            Account.SNAPSHOT_VERSION_DEFAULT_VALUE, containers, refQuotaResourceType), null);
  }
Asserts that create an {@link Account} fails and throw an exception as expected, when supplying an invalid
list of {@link Container}s.
@param containers A list of invalid {@link Container}s.
@param exceptionClass The class of expected exception.
ambry-api/src/test/java/com/github/ambry/account/AccountContainerTest.java