HttpClientConfig { public HttpClientConfig withObjectMapper(ObjectMapper newMapper) { return new HttpClientConfig(newMapper, proxySettings); } 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();  }
@Test public void testWithObjectMapper() { ObjectMapper mapper = mock(ObjectMapper.class); HttpClientConfig config = HttpClientConfig.basicConfig().withObjectMapper(mapper); assertThat(config.proxySettings()).isSameAs(HttpClientConfig.basicConfig().proxySettings()); assertThat(config.customObjectMapper()).contains(mapper); }