RestClientFactory { @Deprecated public RestClient create(RequestSigner requestSigner) { return this.create(requestSigner, Collections.<SigningStrategy, RequestSigner>emptyMap()); } 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 validateCircuitBreakerInitialized() { RestClient client = RestClientFactoryBuilder.builder() .build() .create( null, null, ClientConfiguration.builder() .circuitBreakerConfiguration( CircuitBreakerConfiguration.builder().build()) .build()); Assert.assertNotNull(client.circuitBreaker); }
@Test public void validateCircuitBreakerIsSetToNullWhenNotConfigured() { RestClient client = RestClientFactoryBuilder.builder() .build() .create(null, null, ClientConfiguration.builder().build()); Assert.assertNull(client.circuitBreaker); }