I have these two mock server tests. When I launch these, the second test fail because the two tests are not launched in isolation. The mocking of the HTTP call in the first method isn’t override in the second method. Is there a Mock Server property or a JUnit property to run these two tests in isolation ? Answer At
Tag: mockserver
MockServer verify with multiple body matchers
I’m using MockServer body matchers to verify an endpoint request’s body parameters. Some properties can be matched exactly, but others may need a separate subString or regex matcher, because part of that property is unknown. For example, a date-time string may have a known date, but unknown time. However, with multiple withBody() calls, the verify method passes if one or
How to set up different responses for the same request to MockServer?
i’m having an issue when setting up the MockServerClient for multiple responses with the exact same request. I read that with expectations with “Times” this might be done, but i coulnd’t make it work with my scenario. If you call the service with this JSON (twice): The first response should be “passed true”, the second “passed false” Response 1: Response