RouteEndpoint implements Endpoint { @Override public EndpointInfo info() { return new EndpointInfo( target.uri(), target.method(), methodName, target.docString()); } RouteEndpoint(Route<? extends AsyncHandler<Response<ByteString>>> target);   RouteEndpoint(Route<? extends AsyncHandler<Response<ByteString>>> target, String methodName); @Override EndpointInfo info(); @Override CompletionStage<Response<ByteString>> invoke(RequestContext requestContext);  }
@Test public void shouldIncludeDocstringInEndpointInfo() throws Exception { endpoint = new RouteEndpoint(Route.sync("GET", "http: .withDocString("summarium", "this is a kewl description")); assertThat(endpoint.info().getDocString(), equalTo(Optional.of(DocString.doc("summarium", "this is a kewl description")))); }