### Question:
Formats { public static List<String> types(final String... types) { return types(asList(types)); } 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 testTypesParseStrings() { assertThat(emptyList()).as("empty").isEqualTo(Formats.types("")); assertThat(singletonList("text/turtle")).as("single").isEqualTo(Formats.types("text/turtle")); assertThat(asList("text/turtle", "text/plain")).as("multiple").isEqualTo(Formats.types("text/turtle, " +"text/plain")); assertThat(singletonList("**")); assertThat(singletonList("text/*")).as("type wildcard").isEqualTo(Formats.types("text/*")); }
@Test void testTypesParseStringLists() { assertThat(emptyList()).as("empty").isEqualTo(Formats.types("")); assertThat(asList("text/turtle", "text/plain")).as("single").isEqualTo(Formats.types("text/turtle, " +"text/plain")); assertThat(asList("text/turtle", "text/plain", "text/csv")).as("multiple").isEqualTo(Formats.types("text" +"/turtle, text/plain", "text/csv")); }
@Test void testTypesParseLeniently() { assertThat(singletonList("text/plain")).as("normalize case").isEqualTo(Formats.types("text/Plain")); assertThat(singletonList("text/plain")).as("ignores spaces").isEqualTo(Formats.types(" text/plain ; q = 0.3")); assertThat(asList("text/turtle", "text/plain", "text/csv")).as("lenient separators").isEqualTo(Formats.types( "text/turtle, text/plain\ttext/csv")); }
@Test void testSortOnQuality() { assertThat(asList("text/plain", "text/turtle")).as("sorted").isEqualTo(Formats.types("text/turtle;q=0.1, " +"text/plain;q=0.2")); assertThat(asList("text/plain", "text/turtle")).as("sorted with default values").isEqualTo(Formats.types("text" +"/turtle;q=0.1, text/plain")); assertThat(asList("text/plain", "text/turtle")).as("sorted with corrupt values").isEqualTo(Formats.types("text" +"/turtle;q=x, text/plain")); }