public static void validateRequestHeadersAndUpdateResourceContext(final Map<String, String> headers,
                                                                    final Set<String> customMimeTypesSupported,
                                                                    ServerResourceContext resourceContext)
  {
    validateRequestHeadersAndUpdateResourceContext(headers, customMimeTypesSupported, resourceContext,
        new RequestContext());
  }
@Test()
  public void testValidateRequestHeadersWithValidAcceptHeaderAndNoMatch() throws Exception
  {
    Map<String, String> headers = new HashMap<>();
    headers.put("Accept", "text/html");
    ServerResourceContext resourceContext = new ResourceContextImpl();
    try
    {
      RestUtils.validateRequestHeadersAndUpdateResourceContext(headers, Collections.emptySet(), resourceContext);
      Assert.fail();
    }
    catch (RestLiServiceException e)
    {
      Assert.assertEquals(e.getStatus(), HttpStatus.S_406_NOT_ACCEPTABLE);
      Assert.assertEquals(e.getMessage(),
                          "None of the types in the request's 'Accept' header are supported. " +
                          "Supported MIME types are: " + RestConstants.SUPPORTED_MIME_TYPES + "[]");
      Assert.assertEquals(resourceContext.getResponseMimeType(), null);
    }
  }