private void verifyAccountAndContainerHeaders(MockRestResponseChannel restResponseChannel, Account expectedAccount,
      Container expectedContainer) {
    if (expectedAccount != null && expectedAccount.getId() != Account.UNKNOWN_ACCOUNT_ID && expectedContainer != null
        && expectedContainer.getId() != Container.UNKNOWN_CONTAINER_ID) {
      Assert.assertEquals("Account name not as expected", expectedAccount.getName(),
          restResponseChannel.getHeader(RestUtils.Headers.TARGET_ACCOUNT_NAME));
      Assert.assertEquals("Container name not as expected", expectedContainer.getName(),
          restResponseChannel.getHeader(RestUtils.Headers.TARGET_CONTAINER_NAME));
      Assert.assertEquals("Private value mismatch", !expectedContainer.isCacheable(),
          Boolean.parseBoolean(restResponseChannel.getHeader(RestUtils.Headers.PRIVATE)));
    } else {
      verifyAbsenceOfHeaders(restResponseChannel, RestUtils.Headers.TARGET_ACCOUNT_NAME,
          RestUtils.Headers.TARGET_CONTAINER_NAME);
    }
  }
Verify that the account and container headers in the response are correct.
@param restResponseChannel the {@link MockRestResponseChannel} to get headers from.
@param expectedAccount the expected {@link Account}. Can be {@code null} if response is not expected to have the
                       details.
@param expectedContainer the expected {@link Container}. Can be {@code null} if response is not expected to have
                         the details.
ambry-frontend/src/test/java/com/github/ambry/frontend/AmbrySecurityServiceTest.java