According to the documentation, when using @SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
TestRestTemplate
will resolve relative links to the running server.
This works when calling TestRestTemplate
with a String parameter for the uri. When using the methods that take a java.net.URI
I get org.apache.http.ProtocolException: Target host is not specified