From aa80328881546ff41c9ea43f30c179b93394f340 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sun, 23 Jun 2019 17:22:18 +0530 Subject: [PATCH] [BAEL-14274] - Fixed article code for https://www.baeldung.com/rest-template --- .../java/org/baeldung/client/RestTemplateBasicLiveTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-resttemplate/src/test/java/org/baeldung/client/RestTemplateBasicLiveTest.java b/spring-resttemplate/src/test/java/org/baeldung/client/RestTemplateBasicLiveTest.java index a54c124d5f..ff3034a50d 100644 --- a/spring-resttemplate/src/test/java/org/baeldung/client/RestTemplateBasicLiveTest.java +++ b/spring-resttemplate/src/test/java/org/baeldung/client/RestTemplateBasicLiveTest.java @@ -188,7 +188,7 @@ public class RestTemplateBasicLiveTest { final String resourceUrl = fooResourceUrl + '/' + createResponse.getBody() .getId(); final HttpEntity requestUpdate = new HttpEntity<>(updatedResource, headers); - final ClientHttpRequestFactory requestFactory = getSimpleClientHttpRequestFactory(); + final ClientHttpRequestFactory requestFactory = getClientHttpRequestFactory(); final RestTemplate template = new RestTemplate(requestFactory); template.setMessageConverters(Arrays.asList(new MappingJackson2HttpMessageConverter())); template.patchForObject(resourceUrl, requestUpdate, Void.class); @@ -262,7 +262,7 @@ public class RestTemplateBasicLiveTest { // Simply setting restTemplate timeout using ClientHttpRequestFactory - ClientHttpRequestFactory getSimpleClientHttpRequestFactory() { + ClientHttpRequestFactory getClientHttpRequestFactory() { final int timeout = 5; final HttpComponentsClientHttpRequestFactory clientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory(); clientHttpRequestFactory.setConnectTimeout(timeout * 1000);