RestClientFactory { @VisibleForTesting static Client createClient( RequestSigner defaultRequestSigner, Map<SigningStrategy, RequestSigner> requestSigners, ClientConfiguration configuration, ClientConfigurator clientConfigurator) { ClientBuilder builder = JerseyClientBuilder.newBuilder(); clientConfigurator.customizeBuilder(builder); Client client = builder.build() .register(JACKSON_JSON_PROVIDER) .property( ClientProperties.CONNECT_TIMEOUT, configuration.getConnectionTimeoutMillis()) .property( ClientProperties.READ_TIMEOUT, configuration.getReadTimeoutMillis()) .property( ClientProperties.ASYNC_THREADPOOL_SIZE, configuration.getMaxAsyncThreads()) .property(InternalProperties.JSON_FEATURE, "JacksonFeature"); client.register(new AuthnClientFilter(defaultRequestSigner, requestSigners)); client.register(CLIENT_ID_FILTER); client.register(LOG_HEADERS_FILTER); client.register(RETRY_TOKEN_FILTER); clientConfigurator.customizeClient(client); return client; } RestClientFactory(@Nonnull ClientConfigurator clientConfigurator); @Deprecated RestClient create(RequestSigner requestSigner); @Deprecated RestClient create(RequestSigner requestSigner, ClientConfiguration configuration); RestClient create(
            RequestSigner defaultRequestSigner,
            Map<SigningStrategy, RequestSigner> requestSigners); RestClient create(
            RequestSigner defaultRequestSigner,
            Map<SigningStrategy, RequestSigner> requestSigners,
            ClientConfiguration configuration); static ObjectMapper getObjectMapper();  }
@Test public void isJacksonFeatureRegistered() { final JerseyClient client = (JerseyClient) RestClientFactory.createClient( null, null, ClientConfiguration.builder() .circuitBreakerConfiguration( CircuitBreakerConfiguration.builder().build()) .build(), new CompositeClientConfigurator(ImmutableList.of())); assertEquals( "JacksonFeature", client.getConfiguration().getProperty(InternalProperties.JSON_FEATURE)); }