@Test public void should_disable_proxy_authentication_if_system_properties_for_proxy_credentials_are_not_defined() { HttpClient.SystemProperties sysProps = mock(HttpClient.SystemProperties.class); when(sysProps.getProperty("http.proxyHost")).thenReturn("proxy.mydomain"); 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);  }