@Test public void proxiesAreNotUsedEvenIfPropertyIsSet() throws IOException { System.getProperties().put("http.proxyHost", "localhost"); System.getProperties().put("http.proxyPort", String.valueOf(mockProxyServer.port())); HttpURLConnection connection = sut.connectToEndpoint(URI.create("http: assertThat(connection.getRequestMethod(), is("GET")); assertThat(connection.usingProxy(), is(false)); }
public HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers) throws IOException { return connectToEndpoint(endpoint, headers, "GET"); }
ConnectionUtils { public HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers) throws IOException { return connectToEndpoint(endpoint, headers, "GET"); } }
ConnectionUtils { public HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers) throws IOException { return connectToEndpoint(endpoint, headers, "GET"); } private  ConnectionUtils(); }
ConnectionUtils { public HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers) throws IOException { return connectToEndpoint(endpoint, headers, "GET"); } private  ConnectionUtils(); static ConnectionUtils getInstance(); HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers); HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers, String method); }
ConnectionUtils { public HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers) throws IOException { return connectToEndpoint(endpoint, headers, "GET"); } private  ConnectionUtils(); static ConnectionUtils getInstance(); HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers); HttpURLConnection connectToEndpoint(URI endpoint, Map<String, String> headers, String method);  }