public static void ensureRequiredHeadersOrThrow(RestRequest restRequest, Set<String> requiredHeaders)
      throws RestServiceException {
    Map<String, Object> args = restRequest.getArgs();
    for (String header : requiredHeaders) {
      getHeader(args, header, true);
    }
  }
Ensures the required headers are present.
@param restRequest The {@link RestRequest} to ensure header presence. Cannot be {@code null}.
@param requiredHeaders A set of headers to check presence. Cannot be {@code null}.
@throws RestServiceException if any of the headers is missing.
ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java