@Test public void parses_jax_rs_annotations_into_http_verbs() { String jaxRsClass = JaxRsAnnotatedClass.class.getName(); assertThat(visitor.visit(elements.of(jaxRsClass, "nothing")).isPresent()).isFalse(); assertThat(visitor.visit(elements.of(jaxRsClass, "get")).get()).isEqualTo(HttpVerb.GET); assertThat(visitor.visit(elements.of(jaxRsClass, "post")).get()).isEqualTo(HttpVerb.POST); assertThat(visitor.visit(elements.of(jaxRsClass, "put")).get()).isEqualTo(HttpVerb.PUT); assertThat(visitor.visit(elements.of(jaxRsClass, "delete")).get()).isEqualTo(HttpVerb.DELETE); assertThat(visitor.visit(elements.of(jaxRsClass, "head")).get()).isEqualTo(HttpVerb.HEAD); assertThat(visitor.visit(elements.of(jaxRsClass, "options")).get()).isEqualTo(HttpVerb.OPTIONS); }
public Optional<HttpVerb> visit(final ExecutableElement methodElement) { return matchingAnnotation(methodElement).map(JAX_RS_HTTP_VERBS::get); }
HttpVerbVisitor { public Optional<HttpVerb> visit(final ExecutableElement methodElement) { return matchingAnnotation(methodElement).map(JAX_RS_HTTP_VERBS::get); } }
HttpVerbVisitor { public Optional<HttpVerb> visit(final ExecutableElement methodElement) { return matchingAnnotation(methodElement).map(JAX_RS_HTTP_VERBS::get); }  }
HttpVerbVisitor { public Optional<HttpVerb> visit(final ExecutableElement methodElement) { return matchingAnnotation(methodElement).map(JAX_RS_HTTP_VERBS::get); }  Optional<HttpVerb> visit(final ExecutableElement methodElement); }
HttpVerbVisitor { public Optional<HttpVerb> visit(final ExecutableElement methodElement) { return matchingAnnotation(methodElement).map(JAX_RS_HTTP_VERBS::get); }  Optional<HttpVerb> visit(final ExecutableElement methodElement);  }