### Question:
DefaultWhenHttpClient implements WhenHttpClient { @Override public Promise<HttpClientResponse> request(HttpMethod method, int port, String host, String requestURI) { return request(method, port, host, requestURI, null); } @Inject  DefaultWhenHttpClient(Vertx vertx, When when); @Override Promise<HttpClientResponse> request(HttpMethod method, int port, String host, String requestURI); @Override Promise<HttpClientResponse> request(HttpMethod method, int port, String host, String requestURI, RequestOptions options); @Override Promise<HttpClientResponse> request(HttpMethod method, String host, String requestURI); @Override Promise<HttpClientResponse> request(HttpMethod method, String host, String requestURI, RequestOptions options); @Override Promise<HttpClientResponse> request(HttpMethod method, String requestURI); @Override Promise<HttpClientResponse> request(HttpMethod method, String requestURI, RequestOptions options); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, int port, String host, String requestURI); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, int port, String host, String requestURI, RequestOptions options); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, String host, String requestURI); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, String host, String requestURI, RequestOptions options); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, String requestURI); @Override Promise<HttpClientResponseAndBody> requestAndReadBody(HttpMethod method, String requestURI, RequestOptions options); @Override Promise<HttpClientResponse> requestAbs(HttpMethod method, String absoluteURI); @Override Promise<HttpClientResponse> requestAbs(HttpMethod method, String absoluteURI, RequestOptions options); @Override Promise<HttpClientResponseAndBody> requestAbsAndReadBody(HttpMethod method, String absoluteURI); @Override Promise<HttpClientResponseAndBody> requestAbsAndReadBody(HttpMethod method, String absoluteURI, RequestOptions options); @Override Promise<Buffer> body(HttpClientResponse response);  }### Answer:
@Test public void testRequest1() throws Exception { Promise<HttpClientResponse> p = whenHttpClient.request(HttpMethod.POST, port, host, requestURI); verify(client).request(eq(HttpMethod.POST), eq(port), eq(host), eq(requestURI)); verifyResponse(p); }
@Test public void testRequest2() throws Exception { Promise<HttpClientResponse> p = whenHttpClient.request(HttpMethod.POST, host, requestURI); verify(client).request(eq(HttpMethod.POST), eq(host), eq(requestURI)); verifyResponse(p); }
@Test public void testRequest3() throws Exception { Promise<HttpClientResponse> p = whenHttpClient.request(HttpMethod.POST, requestURI); verify(client).request(eq(HttpMethod.POST), eq(requestURI)); verifyResponse(p); }