@Test(expected = IOException.class) public void executeRequestThrowsIoExceptionIfRequestNotAbortedAndHttpClientThrowsIOException() throws ClientProtocolException, IOException, FailedHttpResponseException, InterruptedException { HttpUriRequest request = mockRequest(); when(request.isAborted()).thenReturn(false); when(client.execute(any(HttpUriRequest.class))).thenThrow(new IOException("Foo")); executor = new RequestExecutor(request, factory, mock(Settings.class)); executor.execute(); }
public BufferedHttpEntity execute() throws IOException, InterruptedException, FailedHttpResponseException { CloseableHttpClient httpClient = factory.makeHttpClient(); return executeRequest(httpClient); }
RequestExecutor { public BufferedHttpEntity execute() throws IOException, InterruptedException, FailedHttpResponseException { CloseableHttpClient httpClient = factory.makeHttpClient(); return executeRequest(httpClient); } }
RequestExecutor { public BufferedHttpEntity execute() throws IOException, InterruptedException, FailedHttpResponseException { CloseableHttpClient httpClient = factory.makeHttpClient(); return executeRequest(httpClient); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); }
RequestExecutor { public BufferedHttpEntity execute() throws IOException, InterruptedException, FailedHttpResponseException { CloseableHttpClient httpClient = factory.makeHttpClient(); return executeRequest(httpClient); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); RequestExecutor setCredentials(String username, String password); RequestExecutor setCredentials(UsernamePasswordCredentials credentials); BufferedHttpEntity execute(); @Override String toString(); }
RequestExecutor { public BufferedHttpEntity execute() throws IOException, InterruptedException, FailedHttpResponseException { CloseableHttpClient httpClient = factory.makeHttpClient(); return executeRequest(httpClient); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); RequestExecutor setCredentials(String username, String password); RequestExecutor setCredentials(UsernamePasswordCredentials credentials); BufferedHttpEntity execute(); @Override String toString();  }