use of org.springframework.boot.test.web.client.TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory in project spring-boot by spring-projects.
the class TestRestTemplateTests method options.
@Test
public void options() throws Exception {
TestRestTemplate template = new TestRestTemplate(HttpClientOption.ENABLE_REDIRECTS);
CustomHttpComponentsClientHttpRequestFactory factory = (CustomHttpComponentsClientHttpRequestFactory) template.getRestTemplate().getRequestFactory();
RequestConfig config = factory.getRequestConfig();
assertThat(config.isRedirectsEnabled()).isTrue();
}
Aggregations