@Test public void acceptDoesNotRequireAnExtensionParameterAfterQualityDefinition() { final Weighted<MediaType> weighted = accept("text/turtle;q=0.000"); assertThat(weighted.hasWeight(),equalTo(true)); assertThat(weighted.weight(),equalTo(0.0D)); final MediaType result = weighted.entity(); assertThat(result.parameters().isEmpty(),equalTo(true)); assertThat(result.type(),equalTo("text")); assertThat(result.subType(),equalTo("turtle")); }
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();   }