All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.axway.apim.WiremockWrapper Maven / Gradle / Ivy

There is a newer version: 1.14.6
Show newest version
package com.axway.apim;

import com.github.tomakehurst.wiremock.WireMockServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;

public class WiremockWrapper {

    private static final Logger LOG = LoggerFactory.getLogger(WiremockWrapper.class);

    WireMockServer wireMockServer;


    public void initWiremock(){

        wireMockServer = new WireMockServer(options().httpsPort(8075).jettyIdleTimeout(30000L).jettyStopTimeout(10000L)
                .usingFilesUnderClasspath("wiremock_apim"));
        System.setProperty("http.keepAlive", "false");
        wireMockServer.start();
        LOG.info("Wiremock server started");
    }

    public void close() {
        wireMockServer.stop();
        LOG.info("Wiremock server stopped");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy