List of usage examples for org.springframework.boot.web.client RestTemplateBuilder RestTemplateBuilder
public RestTemplateBuilder(RestTemplateCustomizer... customizers)
From source file:org.springframework.boot.web.client.RestTemplateBuilderTests.java
@Test public void createWhenCustomizersAreNullShouldThrowException() throws Exception { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage("Customizers must not be null"); RestTemplateCustomizer[] customizers = null; new RestTemplateBuilder(customizers); }
From source file:org.springframework.boot.web.client.RestTemplateBuilderTests.java
@Test public void createWithCustomizersShouldApplyCustomizers() throws Exception { RestTemplateCustomizer customizer = mock(RestTemplateCustomizer.class); RestTemplate template = new RestTemplateBuilder(customizer).build(); verify(customizer).customize(template); }