@Test public void should_disable_proxy_authentication_if_proxy_credentials_are_defined_but_not_host() { HttpClient.SystemProperties sysProps = mock(HttpClient.SystemProperties.class); when(sysProps.getProperty("http.proxyUser")).thenReturn("foo"); when(sysProps.getProperty("http.proxyPassword")).thenReturn("bar"); HttpClient underTest = new HttpClient.Builder().setSystemProperties(sysProps).build(); Authenticator proxyAuthenticator = underTest.getUnderlying().proxyAuthenticator(); assertThat(proxyAuthenticator).isNotInstanceOf(HttpClient.ProxyAuthenticator.class); }
OkHttpClient getUnderlying() { return okClient; }
HttpClient { OkHttpClient getUnderlying() { return okClient; } }
HttpClient { OkHttpClient getUnderlying() { return okClient; } private  HttpClient(OkHttpClient okClient); }
HttpClient { OkHttpClient getUnderlying() { return okClient; } private  HttpClient(OkHttpClient okClient); HttpCall newCall(HttpUrl url); }
HttpClient { OkHttpClient getUnderlying() { return okClient; } private  HttpClient(OkHttpClient okClient); HttpCall newCall(HttpUrl url);  }