@Test(expected = FailedHttpResponseException.class) public void executeThrowsFailedHttpResponseExceptionOn() throws ClientProtocolException, IOException, FailedHttpResponseException, InterruptedException { HttpUriRequest request = mockRequest(); when(line.getStatusCode()).thenReturn(403); Settings settings = mock(Settings.class); executor = new RequestExecutor(request, factory, settings); 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();  }