Scheme implements Comparable<Scheme> { public static Scheme parse(String scheme) { final Scheme parsedScheme = tryParse(requireNonNull(scheme, "scheme")); if (parsedScheme == null) { throw new IllegalArgumentException("scheme: " + scheme); } return parsedScheme; } private  Scheme(SerializationFormat serializationFormat, SessionProtocol sessionProtocol); @Nullable static Scheme tryParse(@Nullable String scheme); static Scheme parse(String scheme); static Scheme of(SerializationFormat serializationFormat, SessionProtocol sessionProtocol); SerializationFormat serializationFormat(); SessionProtocol sessionProtocol(); String uriText(); @Override int hashCode(); @Override boolean equals(@Nullable Object obj); @Override int compareTo(Scheme o); @Override String toString();  }
@Test void parse_null() { assertThatThrownBy(() -> Scheme.parse(null)).isInstanceOf(NullPointerException.class); }
@Test void parse_exception() { assertThatThrownBy(() -> Scheme.parse("http+blah")).isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("scheme: http+blah"); }