private RestRequest createRestRequest(String requestBody, String accountName, String accountId) throws Exception {
    JSONObject data = new JSONObject();
    data.put(MockRestRequest.REST_METHOD_KEY, RestMethod.POST.name());
    data.put(MockRestRequest.URI_KEY, Operations.ACCOUNTS_CONTAINERS);
    JSONObject headers = new JSONObject();
    if (accountName != null) {
      headers.put(RestUtils.Headers.TARGET_ACCOUNT_NAME, accountName);
    }
    if (accountId != null) {
      headers.put(RestUtils.Headers.TARGET_ACCOUNT_ID, accountId);
    }
    data.put(MockRestRequest.HEADERS_KEY, headers);
    List<ByteBuffer> body = new LinkedList<>();
    body.add(ByteBuffer.wrap(requestBody.getBytes(StandardCharsets.UTF_8)));
    body.add(null);
    RestRequest restRequest = new MockRestRequest(data, body);
    restRequest.setArg(RestUtils.InternalKeys.REQUEST_PATH, RequestPath.parse(restRequest, null, null));
    return restRequest;
  }
Creates a {@link RestRequest} for a /accounts/updateContainers request
@param requestBody body of the request in string form.
@param accountName if set, add this account name as a request header.
@param accountId if set, add this account ID as a request header.
@return the {@link RestRequest}
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/PostAccountContainersHandlerTest.java