Is it possible to have a test using Wiremock for a known POST request, in order to check the query params the request has?
wireMockServer.start();
stubFor(post(urlMatching("http://localhost:8080/smth.*"))
.withHeader("Content-Type", equalTo("application/x-www-form-urlencoded"))
.withQueryParam("authorizationcode", equalTo("123456"))
.withQueryParam("baseamount", equalTo("0.10"))
.withQueryParam("basecurrency", equalTo("978"))
.withQueryParam("cardcountry", equalTo("ITA"))
.withQueryParam("cardexpirydate", equalTo("0120"))
.withQueryParam("customfield",equalTo("some+custom+field"))
.withQueryParam("result", equalTo("APPROVED"))
.willReturn(aResponse().withBody(RESPONSE))
);
wireMockServer.stop();
I don't know if I am on the right path, I can't find good examples in the documentation.