Sandro
02/18/2025, 12:18 PMjava.net.ConnectException: Connection refused: connect
. What am I missing here?
public class CreateStubs {
@Test
void recordStubs() {
WireMock wireMockClient = new WireMock(9080);
given()
.baseUri("<http://localhost:9080/>")
.body("...")
.when()
.post("...")
.then()
.log();
wireMockClient.saveMappings();
}
}
Tom
02/18/2025, 5:02 PM@WireMockTest
or you can create the server programmatically:
WireMockServer wm = new WireMockServer(9080);
wm.start();
WireMock wireMockClient = new WireMock(9080);