@Test public void executorDoesNotSetCredentialsToRequestIfExecutorHasNoCredentials() throws FailedHttpResponseException, IOException, InterruptedException { HttpUriRequest request = mockRequest(); executor = new RequestExecutor(request, factory, mock(Settings.class)); executor.execute(); verify(request, times(0)).addHeader(any(Header.class)); }
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();  }