@Test public void testWithProxySettings() { ProxySettings proxySettings = ProxySettings.useProxy("proxy.host", 12345); ObjectMapper mapper = mock(ObjectMapper.class); HttpClientConfig config = HttpClientConfig.basicConfig() .withObjectMapper(mapper) .withProxySettings(proxySettings); assertThat(config.proxySettings()).isSameAs(proxySettings); assertThat(config.customObjectMapper()).contains(mapper); }
public HttpClientConfig withProxySettings(ProxySettings newProxySettings) { return new HttpClientConfig(customObjectMapper, newProxySettings); }
HttpClientConfig { public HttpClientConfig withProxySettings(ProxySettings newProxySettings) { return new HttpClientConfig(customObjectMapper, newProxySettings); } }
HttpClientConfig { public HttpClientConfig withProxySettings(ProxySettings newProxySettings) { return new HttpClientConfig(customObjectMapper, newProxySettings); } private  HttpClientConfig(ObjectMapper customObjectMapper, ProxySettings proxySettings); }
HttpClientConfig { public HttpClientConfig withProxySettings(ProxySettings newProxySettings) { return new HttpClientConfig(customObjectMapper, newProxySettings); } private  HttpClientConfig(ObjectMapper customObjectMapper, ProxySettings proxySettings); static HttpClientConfig basicConfig(); Optional<ObjectMapper> customObjectMapper(); ObjectMapper getOrCreateObjectMapper(); ProxySettings proxySettings(); HttpClientConfig withObjectMapper(ObjectMapper newMapper); HttpClientConfig withProxySettings(ProxySettings newProxySettings); @Override boolean equals(Object o); @Override int hashCode(); }
HttpClientConfig { public HttpClientConfig withProxySettings(ProxySettings newProxySettings) { return new HttpClientConfig(customObjectMapper, newProxySettings); } private  HttpClientConfig(ObjectMapper customObjectMapper, ProxySettings proxySettings); static HttpClientConfig basicConfig(); Optional<ObjectMapper> customObjectMapper(); ObjectMapper getOrCreateObjectMapper(); ProxySettings proxySettings(); HttpClientConfig withObjectMapper(ObjectMapper newMapper); HttpClientConfig withProxySettings(ProxySettings newProxySettings); @Override boolean equals(Object o); @Override int hashCode();  }