By default some values that change from test to test or environment to environment are replaced with placeholders. These replacement:
disablePlaceholders
on RestExtension
class.
@Extension public RestExtension extension = new RestExtension();And there is a enpoint /where-i-am serving
{"location": "http://localhost:8080/where-i-am"}And it is setting session to: ajsh2934sdjhfdskf
<rest:request> <rest:get>/where-i-am</rest:get> <rest:responseBody> { "location": "http://{host}:{port}/where-i-am" } </rest:responseBody> <rest:header name="Set-Cookie">JSESSIONID={sessionId}</rest:header> </rest:request>Then it should succeed.
@Extension public RestExtension extension = new RestExtension().disablePlaceholders();And there is a enpoint /where-i-am serving
{"location": "http://localhost:8080/where-i-am"}And it is setting session to: ajsh2934sdjhfdskf
<rest:request> <rest:get>/where-i-am</rest:get> <rest:responseBody> { "location": "http://localhost:8080/where-i-am" } </rest:responseBody> <rest:header name="Set-Cookie">JSESSIONID=ajsh2934sdjhfdskf</rest:header> </rest:request>Then it should succeed.