SerializationFormat implements Comparable<SerializationFormat> { @Nullable public static SerializationFormat find(String uriText) { uriText = Ascii.toLowerCase(requireNonNull(uriText, "uriText")); return uriTextToFormats.get(uriText); } private  SerializationFormat(String uriText, MediaType primaryMediaType, MediaTypeSet mediaTypes); static Set<SerializationFormat> values(); static SerializationFormat of(String uriText); @Nullable static SerializationFormat find(String uriText); @Nullable static SerializationFormat find(MediaType... ranges); String uriText(); MediaType mediaType(); MediaTypeSet mediaTypes(); boolean isAccepted(MediaType range); boolean isAccepted(MediaType first, MediaType... rest); boolean isAccepted(Iterable<MediaType> ranges); @Override int hashCode(); @Override boolean equals(@Nullable Object obj); @Override int compareTo(SerializationFormat o); @Override String toString(); static final SerializationFormat NONE; static final SerializationFormat UNKNOWN; }
@Test void findByMediaType_notRecognized() { assertThat(SerializationFormat.find(parse("foo/bar"))).isNull(); }