### Question:
HttpRequestMethod { public static HttpRequestMethod of(final String name, final Properties properties) { return new HttpRequestMethod(name, properties); } private  HttpRequestMethod(final String name, final Properties properties); static HttpRequestMethod of(final String name, final Properties properties); @Nullable static HttpRequestMethod of(final String name); void writeTo(final Buffer buffer); String name(); Properties properties(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final HttpRequestMethod GET; static final HttpRequestMethod HEAD; static final HttpRequestMethod POST; static final HttpRequestMethod PUT; static final HttpRequestMethod DELETE; static final HttpRequestMethod CONNECT; static final HttpRequestMethod OPTIONS; static final HttpRequestMethod TRACE; static final HttpRequestMethod PATCH; }### Answer:
@Test public void testOfStringReturnsConstants() { assertThat(HttpRequestMethod.of("GET"), sameInstance(GET)); assertThat(HttpRequestMethod.of("HEAD"), sameInstance(HEAD)); assertThat(HttpRequestMethod.of("POST"), sameInstance(POST)); assertThat(HttpRequestMethod.of("PUT"), sameInstance(PUT)); assertThat(HttpRequestMethod.of("DELETE"), sameInstance(DELETE)); assertThat(HttpRequestMethod.of("CONNECT"), sameInstance(CONNECT)); assertThat(HttpRequestMethod.of("OPTIONS"), sameInstance(OPTIONS)); assertThat(HttpRequestMethod.of("TRACE"), sameInstance(TRACE)); assertThat(HttpRequestMethod.of("PATCH"), sameInstance(PATCH)); }
@Test public void testOfStringReturnsNullForUnknownMethod() { assertThat(HttpRequestMethod.of("UNKNOWN"), is(nullValue())); }