public static void validateRequestHeadersAndUpdateResourceContext(final Map<String, String> headers,
                                                                    final Set<String> customMimeTypesSupported,
                                                                    ServerResourceContext resourceContext)
  {
    validateRequestHeadersAndUpdateResourceContext(headers, customMimeTypesSupported, resourceContext,
        new RequestContext());
  }
@Test()
  public void testValidateRequestHeadersForInProcessRequest() throws Exception
  {
    Map<String, String> headers = new AbstractMap<String, String>()
    {
      @Override
      public Set<Entry<String, String>> entrySet() {
        throw new IllegalStateException("Didn't expect headers to be accessed.");
      }
    };
    RequestContext requestContext = new RequestContext();
    requestContext.putLocalAttr(ServerResourceContext.CONTEXT_IN_PROCESS_RESOLUTION_KEY, true);
    ServerResourceContext resourceContext = new ResourceContextImpl();
    RestUtils.validateRequestHeadersAndUpdateResourceContext(headers, Collections.emptySet(), resourceContext,
        requestContext);
    Assert.assertEquals(resourceContext.getResponseMimeType(), ContentType.JSON.getHeaderKey());
  }