### Question:
Formats { public static <F extends FileFormat, S> S service( final FileFormatServiceRegistry<F, S> registry, final F fallback, final String... mimes) { return service(registry, fallback, asList(mimes)); } private  Formats(); static List<String> types(final String... types); static List<String> types(final Iterable<String> types); static S service(
			final FileFormatServiceRegistry<F, S> registry, final F fallback, final String... mimes); static S service(
			final FileFormatServiceRegistry<F, S> registry, final F fallback, final Iterable<String> mimes);  }### Answer:
@Test void testServiceScanMimeTypes() { assertThat((Object)Binary).as("none matching").isSameAs(service(RDFFormat.BINARY, "text/none")); assertThat((Object)Turtle).as("single matching").isSameAs(service(RDFFormat.BINARY, "text/turtle")); assertThat((Object)Turtle).as("leading matching").isSameAs(service(RDFFormat.BINARY, "text/turtle", "text/plain" )); assertThat((Object)Turtle).as("trailing matching").isSameAs(service(RDFFormat.BINARY, "text/none", "text/turtle" )); assertThat((Object)Binary).as("wildcard").isSameAs(service(RDFFormat.BINARY, "*/*, text/plain;q=0.1")); assertThat((Object)Turtle).as("type pattern").isSameAs(service(RDFFormat.BINARY, "text/*, text/plain;q=0.1")); }
@Test void testServiceTrapUnknownFallback() { Assertions.assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> service(new RDFFormat("None", "text/none", Charset.forName("UTF-8"), "", false, false), "text/none") ); }