I am facing an issue that Wiremock says my URLs don't match even though they are the same. Obviously I am missing something. What am I doing wrong?
WireMock.stubFor(WireMock.get(WireMock.urlPathEqualTo("/test/url?bookingCode=XYZ123&lastName=TEST"))
.willReturn(WireMock.aResponse()
.withStatus(200))
)
Below is the console log.
-----------------------------------------------------------------------------------------------------------------------
| Closest stub | Request |
-----------------------------------------------------------------------------------------------------------------------
|
GET | GET
/test/url?bookingCode=XYZ123&lastName=TEST | /test/url?bookingCode=XYZ123&lastName=TEST <<<<< URL does not match
|
|
-----------------------------------------------------------------------------------------------------------------------
Is it because I am not including Headers in the matchers?
If yes, how can I avoid matching the headers? I would like to get a response irrespective of what header I am sending.