I would like to continue loanding all my subs
@AutoConfigureWireMock(port = 0, stubs = "classpath:/mappings/perform-buyback")
And in some test cases on this test class, I would like to change some mock responses to simulate different scenarios.
When I run only my local test method it works fine, when I run all my class it fails. So I come to this question. Is that possible to overwrite some stub that was registered according to the documentation automatically and replace it with stubFor(get(urlEqualTo(
programmatic in each method? What should be the behaver?
You could do it cause if you do new WireMockServer(...)
you can pass in a port of a running WireMock instance and then you can run any logic you want. You can manually stub it, reset it, do whatever you want.