public static Matcher<HttpRequest> methodEquals(String method) {
    if (method == null) throw new NullPointerException("method == null");
    if (method.isEmpty()) throw new NullPointerException("method is empty");
    return new MethodEquals(method);
  }
@Test void methodEquals_matched() {
    when(httpRequest.method()).thenReturn("GET");

    assertThat(methodEquals("GET").matches(httpRequest)).isTrue();
  }