@Test public void testAcceptCharset$onlyAcceptsOneWeight() throws Exception { try { acceptCharset("utf-8;q=0.000;q=1.000"); fail("Should fail for a charset with multiple qualities"); } catch(final IllegalArgumentException e) { assertThat(e.getMessage(),startsWith("Only one quality value can be specified (found 2: ")); } }
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();   }