// Path: src/main/java/net/ozwolf/mockserver/raml/exception/NoValidActionException.java
// public class NoValidActionException extends RamlMockServerException {
//     private final static String MESSAGE = "Expectation [ %s %s ] has no valid matching action specification.";
// 
//     public NoValidActionException(ApiExpectation expectation) {
//         super(String.format(MESSAGE, expectation.getMethod(), expectation.getUri()));
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/exception/NoValidResourceException.java
// public class NoValidResourceException extends RamlMockServerException {
//     private final static String MESSAGE = "Expectation [ %s %s ] has no valid matching resource specification.";
// 
//     public NoValidResourceException(ApiExpectation expectation) {
//         super(String.format(MESSAGE, expectation.getMethod(), expectation.getUri()));
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/internal/domain/body/DefaultBodySpecification.java
// public class DefaultBodySpecification implements BodySpecification {
//     private final MediaType mediaType;
// 
//     public DefaultBodySpecification(MediaType mediaType) {
//         this.mediaType = mediaType;
//     }
// 
//     @Override
//     public ValidationErrors validate(String body) {
//         return new ValidationErrors();
//     }
// 
//     @Override
//     public MediaType getContentType() {
//         return mediaType;
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/internal/domain/body/JsonBodySpecification.java
// public class JsonBodySpecification implements BodySpecification {
//     private final String bodyType;
//     private final MimeType mimeType;
// 
//     public JsonBodySpecification(String bodyType, MimeType mimeType) {
//         this.bodyType = bodyType;
//         this.mimeType = mimeType;
//     }
// 
//     @Override
//     public MediaType getContentType() {
//         return MediaType.APPLICATION_JSON_TYPE;
//     }
// 
//     @Override
//     public ValidationErrors validate(String body) {
//         if (mimeType.getSchema() == null)
//             return new ValidationErrors();
// 
//         return new JsonContentValidator(bodyType).validate(mimeType.getSchema(), body);
//     }
// }


import net.ozwolf.mockserver.raml.exception.NoValidActionException;
import net.ozwolf.mockserver.raml.exception.NoValidResourceException;
import net.ozwolf.mockserver.raml.internal.domain.body.DefaultBodySpecification;
import net.ozwolf.mockserver.raml.internal.domain.body.JsonBodySpecification;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockserver.matchers.TimeToLive;
import org.mockserver.mock.Expectation;
import org.mockserver.model.Header;
import org.mockserver.model.NottableString;
import org.mockserver.model.Parameter;
import org.raml.model.Resource;
import org.raml.model.SecurityScheme;
import org.raml.parser.visitor.RamlDocumentBuilder;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import java.util.Map;
import java.util.Optional;
import static com.google.common.collect.Lists.newArrayList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockserver.matchers.Times.once;
import static org.mockserver.model.HttpRequest.request;
import static org.mockserver.model.HttpResponse.response;
        assertThat(GET_EXPECTATION.getQueryParameter("ttl").isPresent()).isTrue();
        assertThat(GET_EXPECTATION.getQueryParameter("ttl").get().getValues())
                .hasSize(1)
                .contains(NottableString.string("30s"));
    }

    @Test
    public void shouldReturnUriParameterValue() {
        assertThat(GET_EXPECTATION.getUriValueOf("name")).isEqualTo("John");
    }

    @Test
    public void shouldReturnRequestContentType() {
        assertThat(GET_EXPECTATION.getRequestContentType()).isEqualTo(MediaType.APPLICATION_JSON_TYPE);
    }

    @Test
    public void shouldReturnResponseContentType() {
        assertThat(GET_EXPECTATION.getResponseContentType()).isEqualTo(MediaType.APPLICATION_JSON_TYPE);
    }

    @Test
    public void shouldReturnValidResponseBodySpecification() {
        assertThat(GET_EXPECTATION.getResponseBodySpecification().isPresent()).isTrue();
        assertThat(GET_EXPECTATION.getResponseBodySpecification().get()).isInstanceOf(JsonBodySpecification.class);
    }

    @Test
    public void shouldReturnValidRequestBodySpecification() {
        assertThat(PUT_EXPECTATION.getRequestBodySpecification().isPresent()).isTrue();
// Path: src/main/java/net/ozwolf/mockserver/raml/exception/NoValidActionException.java
// public class NoValidActionException extends RamlMockServerException {
//     private final static String MESSAGE = "Expectation [ %s %s ] has no valid matching action specification.";
// 
//     public NoValidActionException(ApiExpectation expectation) {
//         super(String.format(MESSAGE, expectation.getMethod(), expectation.getUri()));
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/exception/NoValidResourceException.java
// public class NoValidResourceException extends RamlMockServerException {
//     private final static String MESSAGE = "Expectation [ %s %s ] has no valid matching resource specification.";
// 
//     public NoValidResourceException(ApiExpectation expectation) {
//         super(String.format(MESSAGE, expectation.getMethod(), expectation.getUri()));
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/internal/domain/body/DefaultBodySpecification.java
// public class DefaultBodySpecification implements BodySpecification {
//     private final MediaType mediaType;
// 
//     public DefaultBodySpecification(MediaType mediaType) {
//         this.mediaType = mediaType;
//     }
// 
//     @Override
//     public ValidationErrors validate(String body) {
//         return new ValidationErrors();
//     }
// 
//     @Override
//     public MediaType getContentType() {
//         return mediaType;
//     }
// }
// 
// Path: src/main/java/net/ozwolf/mockserver/raml/internal/domain/body/JsonBodySpecification.java
// public class JsonBodySpecification implements BodySpecification {
//     private final String bodyType;
//     private final MimeType mimeType;
// 
//     public JsonBodySpecification(String bodyType, MimeType mimeType) {
//         this.bodyType = bodyType;
//         this.mimeType = mimeType;
//     }
// 
//     @Override
//     public MediaType getContentType() {
//         return MediaType.APPLICATION_JSON_TYPE;
//     }
// 
//     @Override
//     public ValidationErrors validate(String body) {
//         if (mimeType.getSchema() == null)
//             return new ValidationErrors();
// 
//         return new JsonContentValidator(bodyType).validate(mimeType.getSchema(), body);
//     }
// }


// Path: src/test/java/net/ozwolf/mockserver/raml/internal/domain/ApiExpectationTest.java
import net.ozwolf.mockserver.raml.exception.NoValidActionException;
import net.ozwolf.mockserver.raml.exception.NoValidResourceException;
import net.ozwolf.mockserver.raml.internal.domain.body.DefaultBodySpecification;
import net.ozwolf.mockserver.raml.internal.domain.body.JsonBodySpecification;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockserver.matchers.TimeToLive;
import org.mockserver.mock.Expectation;
import org.mockserver.model.Header;
import org.mockserver.model.NottableString;
import org.mockserver.model.Parameter;
import org.raml.model.Resource;
import org.raml.model.SecurityScheme;
import org.raml.parser.visitor.RamlDocumentBuilder;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import java.util.Map;
import java.util.Optional;
import static com.google.common.collect.Lists.newArrayList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockserver.matchers.Times.once;
import static org.mockserver.model.HttpRequest.request;
import static org.mockserver.model.HttpResponse.response;

        assertThat(GET_EXPECTATION.getQueryParameter("ttl").isPresent()).isTrue();
        assertThat(GET_EXPECTATION.getQueryParameter("ttl").get().getValues())
                .hasSize(1)
                .contains(NottableString.string("30s"));
    }

    @Test
    public void shouldReturnUriParameterValue() {
        assertThat(GET_EXPECTATION.getUriValueOf("name")).isEqualTo("John");
    }

    @Test
    public void shouldReturnRequestContentType() {
        assertThat(GET_EXPECTATION.getRequestContentType()).isEqualTo(MediaType.APPLICATION_JSON_TYPE);
    }

    @Test
    public void shouldReturnResponseContentType() {
        assertThat(GET_EXPECTATION.getResponseContentType()).isEqualTo(MediaType.APPLICATION_JSON_TYPE);
    }

    @Test
    public void shouldReturnValidResponseBodySpecification() {
        assertThat(GET_EXPECTATION.getResponseBodySpecification().isPresent()).isTrue();
        assertThat(GET_EXPECTATION.getResponseBodySpecification().get()).isInstanceOf(JsonBodySpecification.class);
    }

    @Test
    public void shouldReturnValidRequestBodySpecification() {
        assertThat(PUT_EXPECTATION.getRequestBodySpecification().isPresent()).isTrue();
        assertThat(PUT_EXPECTATION.getRequestBodySpecification().get()).isInstanceOf(DefaultBodySpecification.class);