public static String pickBestEncoding(String acceptHeader, Set<String> customMimeTypesSupported)
  {
    return pickBestEncoding(acceptHeader, null, customMimeTypesSupported);
  }
@Test(dataProvider = "invalidHeaders")
  public void testPickBestEncodingWithInvalidHeaders(String header)
  {
    try
    {
      RestUtils.pickBestEncoding(header, Collections.emptySet());
      Assert.fail();
    }
    catch (RestLiServiceException e)
    {
      Assert.assertEquals(e.getStatus(), HttpStatus.S_400_BAD_REQUEST);
      Assert.assertTrue(e.getMessage().matches("Encountered invalid MIME type '\\w*' in accept header."));
    }
  }