// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static RequestStubbing onRequest() {
//     checkInitialized();
//     return jadlerMockerContainer.get().onRequest();
// }
// 
// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static int port() {
//     checkInitialized();
//     return jadlerMockerContainer.get().getStubHttpServerPort();
// }
// 
// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static Verifying verifyThatRequest() {
//     checkInitialized();
//     return jadlerMockerContainer.get().verifyThatRequest();
// }


import org.apache.http.Header;
import org.apache.http.HttpResponse;
import org.apache.http.client.fluent.Executor;
import org.apache.http.client.fluent.Request;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import java.io.IOException;
import java.nio.charset.Charset;
import static net.jadler.Jadler.onRequest;
import static net.jadler.Jadler.port;
import static net.jadler.Jadler.verifyThatRequest;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayContaining;
import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
    private static final String STRING_WITH_DIACRITICS = "\u00e1\u0159\u017e";
    private static final byte[] ISO_8859_2_REPRESENTATION = {(byte) 0xE1, (byte) 0xF8, (byte) 0xBE};

    @Rule
    public JadlerRule defaultJadler = new JadlerRule()
            .withRequestsRecordingDisabled()
            .withDefaultResponseContentType(DEFAULT_CONTENT_TYPE)
            .withDefaultResponseStatus(DEFAULT_STATUS)
            .withDefaultResponseEncoding(DEFAULT_ENCODING)
            .withDefaultResponseHeader(HEADER_NAME1, HEADER_VALUE1_1)
            .withDefaultResponseHeader(HEADER_NAME1, HEADER_VALUE1_2)
            .withDefaultResponseHeader(HEADER_NAME2, HEADER_VALUE2);

    @AfterClass
    public static void cleanup() {
        Executor.closeIdleConnections();
    }

    private static HeaderMatcher header(final String name, final String value) {
        return new HeaderMatcher(name, value);
    }

    @Before
    public void setUp() {
        //send a default response on any request
        onRequest().respond().withBody(STRING_WITH_DIACRITICS);
    }

    @Test
    public void testWithDefaultPort() {
// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static RequestStubbing onRequest() {
//     checkInitialized();
//     return jadlerMockerContainer.get().onRequest();
// }
// 
// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static int port() {
//     checkInitialized();
//     return jadlerMockerContainer.get().getStubHttpServerPort();
// }
// 
// Path: jadler-core/src/main/java/net/jadler/Jadler.java
// public static Verifying verifyThatRequest() {
//     checkInitialized();
//     return jadlerMockerContainer.get().verifyThatRequest();
// }


// Path: jadler-junit/src/test/java/net/jadler/junit/rule/JadlerRuleIntegrationTest.java
import org.apache.http.Header;
import org.apache.http.HttpResponse;
import org.apache.http.client.fluent.Executor;
import org.apache.http.client.fluent.Request;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import java.io.IOException;
import java.nio.charset.Charset;
import static net.jadler.Jadler.onRequest;
import static net.jadler.Jadler.port;
import static net.jadler.Jadler.verifyThatRequest;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.arrayContaining;
import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;

    private static final String STRING_WITH_DIACRITICS = "\u00e1\u0159\u017e";
    private static final byte[] ISO_8859_2_REPRESENTATION = {(byte) 0xE1, (byte) 0xF8, (byte) 0xBE};

    @Rule
    public JadlerRule defaultJadler = new JadlerRule()
            .withRequestsRecordingDisabled()
            .withDefaultResponseContentType(DEFAULT_CONTENT_TYPE)
            .withDefaultResponseStatus(DEFAULT_STATUS)
            .withDefaultResponseEncoding(DEFAULT_ENCODING)
            .withDefaultResponseHeader(HEADER_NAME1, HEADER_VALUE1_1)
            .withDefaultResponseHeader(HEADER_NAME1, HEADER_VALUE1_2)
            .withDefaultResponseHeader(HEADER_NAME2, HEADER_VALUE2);

    @AfterClass
    public static void cleanup() {
        Executor.closeIdleConnections();
    }

    private static HeaderMatcher header(final String name, final String value) {
        return new HeaderMatcher(name, value);
    }

    @Before
    public void setUp() {
        //send a default response on any request
        onRequest().respond().withBody(STRING_WITH_DIACRITICS);
    }

    @Test
    public void testWithDefaultPort() {
        assertThat(port(), is(greaterThanOrEqualTo(0)));