@Test public void acceptDoesNotAllowsBadContentBeforeExtensionParameter() { try { accept("text/turtle;q=0.000;;param=value dangling data"); fail("accept should fail when fails to find first candidate extension parameter"); } catch (final IllegalArgumentException e) { assertThat(e.getMessage(),startsWith("Invalid content before extension parameter: ")); assertThat(e.getMessage(),endsWith(" (;;param=value dangling data)")); } }
static Weighted<MediaType> accept(final String header) { return Weighted.fromString(header, new MediaTypeParser()); }
ContentNegotiationUtils { static Weighted<MediaType> accept(final String header) { return Weighted.fromString(header, new MediaTypeParser()); } }
ContentNegotiationUtils { static Weighted<MediaType> accept(final String header) { return Weighted.fromString(header, new MediaTypeParser()); } private  ContentNegotiationUtils(); }
ContentNegotiationUtils { static Weighted<MediaType> accept(final String header) { return Weighted.fromString(header, new MediaTypeParser()); } private  ContentNegotiationUtils();  }
ContentNegotiationUtils { static Weighted<MediaType> accept(final String header) { return Weighted.fromString(header, new MediaTypeParser()); } private  ContentNegotiationUtils();   }