@Test
  public void getSingleContainerFailureTest() throws Exception {
    ThrowingBiConsumer<RestRequest, RestServiceErrorCode> testAction = (request, expectedErrorCode) -> {
      TestUtils.assertException(RestServiceException.class,
          () -> sendRequestGetResponse(request, new MockRestResponseChannel()),
          e -> assertEquals("Unexpected error code", expectedErrorCode, e.getErrorCode()));
    };
    // 1. invalid header (i.e. missing container name)
    testAction.accept(createRestRequest("test-account", null, null, Operations.ACCOUNTS_CONTAINERS),
        RestServiceErrorCode.MissingArgs);
    // 2. account not found
    testAction.accept(createRestRequest("fake-account", null, "fake-container", Operations.ACCOUNTS_CONTAINERS),
        RestServiceErrorCode.NotFound);
  }
Test failure case of getting single container.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/GetAccountsHandlerTest.java