### Question:
HttpProtocolClient implements ProtocolClient { @Override public CompletableFuture<Content> readResource(Form form) { HttpUriRequest request = generateRequest(form); return resolveRequestToContent(request); } HttpProtocolClient();   HttpProtocolClient(HttpClient requestClient,
                       Function<RequestConfig, CloseableHttpClient> clientCreator); @Override CompletableFuture<Content> readResource(Form form); @Override CompletableFuture<Content> writeResource(Form form, Content content); @Override CompletableFuture<Content> invokeResource(Form form, Content content); @Override Observable<Content> observeResource(Form form); @Override boolean setSecurity(List<SecurityScheme> metadata, Object credentials);  }### Answer:
@Test public void readResourceShouldCreateProperRequest() throws IOException { when(form.getHref()).thenReturn("http: when(statusLine.getStatusCode()).thenReturn(HttpStatus.SC_OK); when(httpResponse.getStatusLine()).thenReturn(statusLine); when(requestClient.execute(any())).thenReturn(httpResponse); client = new HttpProtocolClient(requestClient, clientCreator); client.readResource(form).join(); HttpUriRequest request = RequestBuilder.create("GET").setUri("http: verify(requestClient).execute(argThat(new HttpUriRequestMatcher(request))); }