I need to check on one outgoing HTTP call from my service to a known endpoint during an integration test.
I'm using Quarkus, jUnit, Test Containers, and WireMock
My feature runs as follows:
On my integration test I need to validate that on step 3, the process is executing the request with the expected transformations and the right outbound payload on the body.
Some solutions I though for it:
I need a way to intercept the outbound request, and check if it is being sent to the right place and with the right data.
On the answer given on this post (on the second bullet point) they describe the exact way I would want to implement this, but until now, I could not find a feasible way to do it.
If you have setup your stubs with Wiremock, then you can use Wiremock.verify
.
See also https://wiremock.org/docs/verifying/