Sinan Pehlivanoglu
01/17/2023, 5:43 PMNot listening on HTTP port. Either HTTP is not enabled or the WireMock server is stopped.
java.lang.IllegalStateException: Not listening on HTTP port. Either HTTP is not enabled or the WireMock server is stopped.
	at wiremock.com.google.common.base.Preconditions.checkState(Preconditions.java:444)
	at com.github.tomakehurst.wiremock.WireMockServer.port(WireMockServer.java:179)4.13.2testImplementation "junit:junit:4.13.2"private Environment newEnvironmentInstance(.....) {
        .... some code here .... 
        final WireMockConfiguration config = wireMockConfig().dynamicPort();
        final WireMockServer mockServer = new WireMockServer(config);
        environment.setUrl(URI.create("<http://localhost>:" + mockServer.port()));
        environment.setService(URI.create("<http://localhost>:" + mockServer.port()));
        environment.setInitial(initial);
        <http://logger.info|logger.info>("Environment started: {} on port {} ({})",
                environment.getId(), mockServer.port(), environment.getName());
        mockServer.start();
        mockServer.stubFor(.....)
  }