From e4d59f4874bfd432a894f6e98fc70dd847cf3f79 Mon Sep 17 00:00:00 2001 From: Roque Santos Date: Thu, 4 Jun 2020 02:23:10 -0300 Subject: [PATCH] BAEL-3844 : Documenting the LiveTests using JavaDoc. --- .../resttemplate/proxy/RequestFactoryLiveTest.java | 9 +++++++++ .../proxy/RestTemplateCustomizerLiveTest.java | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RequestFactoryLiveTest.java b/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RequestFactoryLiveTest.java index 8c13bef05f..93949e52a3 100644 --- a/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RequestFactoryLiveTest.java +++ b/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RequestFactoryLiveTest.java @@ -15,6 +15,15 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; +/** + * This class is used to test a request using {@link RestTemplate} with {@link Proxy} + * using a {@link SimpleClientHttpRequestFactory} as configuration. + *
+ *
+ * + * Before running the test we should change the PROXY_SERVER_HOST + * and PROXY_SERVER_PORT constants in our class to match our preferred proxy configuration. + */ public class RequestFactoryLiveTest { private static final String PROXY_SERVER_HOST = "127.0.0.1"; diff --git a/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RestTemplateCustomizerLiveTest.java b/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RestTemplateCustomizerLiveTest.java index 547428ec9f..faeb49537a 100644 --- a/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RestTemplateCustomizerLiveTest.java +++ b/spring-resttemplate/src/test/java/com/baeldung/resttemplate/proxy/RestTemplateCustomizerLiveTest.java @@ -4,6 +4,8 @@ import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; +import java.net.Proxy; + import org.apache.http.HttpException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; @@ -20,6 +22,15 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; +/** + * This class is used to test a request using {@link RestTemplate} with {@link Proxy} + * using a {@link RestTemplateCustomizer} as configuration. + *
+ *
+ * + * Before running the test we should change the PROXY_SERVER_HOST + * and PROXY_SERVER_PORT constants in our class to match our preferred proxy configuration. + */ public class RestTemplateCustomizerLiveTest { private static final String PROXY_SERVER_HOST = "127.0.0.1";