@Test public void acceptLanguageDoesNotAllowParametersAfterQualityDefinition() { try { acceptLanguage("en-US;q=0.000;param=value"); fail("acceptLanguage should fail when parameters are found after quality definition"); } catch (final IllegalArgumentException e) { assertThat(e.getMessage(),equalTo("Content after quality definition is not allowed (;param=value)")); } }
static Weighted<Language> acceptLanguage(final String header) { return Weighted.fromString(header,new LanguageParser()); }
ContentNegotiationUtils { static Weighted<Language> acceptLanguage(final String header) { return Weighted.fromString(header,new LanguageParser()); } }
ContentNegotiationUtils { static Weighted<Language> acceptLanguage(final String header) { return Weighted.fromString(header,new LanguageParser()); } private  ContentNegotiationUtils(); }
ContentNegotiationUtils { static Weighted<Language> acceptLanguage(final String header) { return Weighted.fromString(header,new LanguageParser()); } private  ContentNegotiationUtils();  }
ContentNegotiationUtils { static Weighted<Language> acceptLanguage(final String header) { return Weighted.fromString(header,new LanguageParser()); } private  ContentNegotiationUtils();   }