@Test public void acceptCharsetDoesNotAllowParametersAfterQualityDefinition() { try { acceptCharset("utf-8;q=0.000;param=value"); fail("acceptCharset 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<CharacterEncoding> acceptCharset(final String header) { return Weighted.fromString(header, new CharsetParser()); }
ContentNegotiationUtils { static Weighted<CharacterEncoding> acceptCharset(final String header) { return Weighted.fromString(header, new CharsetParser()); } }
ContentNegotiationUtils { static Weighted<CharacterEncoding> acceptCharset(final String header) { return Weighted.fromString(header, new CharsetParser()); } private  ContentNegotiationUtils(); }
ContentNegotiationUtils { static Weighted<CharacterEncoding> acceptCharset(final String header) { return Weighted.fromString(header, new CharsetParser()); } private  ContentNegotiationUtils();  }
ContentNegotiationUtils { static Weighted<CharacterEncoding> acceptCharset(final String header) { return Weighted.fromString(header, new CharsetParser()); } private  ContentNegotiationUtils();   }