|
|
|
@ -68,6 +68,7 @@ import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.context.annotation.Import;
|
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.http.client.ClientHttpRequest;
|
|
|
|
|
import org.springframework.http.client.ClientHttpResponse;
|
|
|
|
|
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
|
|
|
@ -496,6 +497,9 @@ public class EndpointWebMvcAutoConfigurationTests {
|
|
|
|
|
.createRequest(new URI("http://localhost:" + port + url), HttpMethod.GET);
|
|
|
|
|
try {
|
|
|
|
|
ClientHttpResponse response = request.execute();
|
|
|
|
|
if (HttpStatus.NOT_FOUND.equals(response.getStatusCode())) {
|
|
|
|
|
throw new FileNotFoundException();
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
String actual = StreamUtils.copyToString(response.getBody(),
|
|
|
|
|
Charset.forName("UTF-8"));
|
|
|
|
|