// Path: pact/provider/spi/src/main/java/org/arquillian/algeron/pact/provider/spi/Target.java
// public interface Target {
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      * <p>
//      * Important: Implementators must implements {@link PactProviderExecutionAwareTarget}
//      * <p>
//      * URL configuration is retrieved from PactProviderConfiguration
//      */
//     void testInteraction();
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      * <p>
//      * Important: Implementators must implements {@link PactProviderExecutionAwareTarget}
//      *
//      * @param url
//      *     where provider is deployed
//      */
//     void testInteraction(URL url);
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      *
//      * @param url
//      *     where provider is deployed
//      * @param consumer
//      *     consumer name that generated the interaction
//      * @param interaction
//      *     interaction to be tested
//      */
//     void testInteraction(URL url, String consumer, RequestResponseInteraction interaction);
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      *
//      * @param consumer
//      *     consumer name that generated the interaction
//      * @param interaction
//      *     interaction to be tested
//      */
//     void testInteraction(String consumer, RequestResponseInteraction interaction);
// }
// 
// Path: pact/provider/assertj/src/main/java/org/arquillian/algeron/pact/provider/assertj/PactProviderAssertions.java
// public static PactProviderAssertions assertThat(Target target) {
//     return new PactProviderAssertions(target);
// }


import org.arquillian.algeron.pact.provider.spi.Provider;
import org.arquillian.algeron.pact.provider.spi.State;
import org.arquillian.algeron.pact.provider.spi.Target;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.net.URL;
import java.util.Map;
import static org.arquillian.algeron.pact.provider.assertj.PactProviderAssertions.assertThat;
package org.arquillian.algeron.pact.provider.ftest;




@RunWith(Arquillian.class)
@Provider("test_provider")
public class MyServiceProviderTest {

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class).addClass(MyService.class);
    }

    @ArquillianResource
    URL webapp;

    @ArquillianResource
    Target target;

    @State("test state")
    public void testStateMethod(Map<String, Object> params) {
        assertThat(params).containsEntry("name", "Alexandra");
    }

    @Test
    public void should_provide_valid_answers() {
// Path: pact/provider/spi/src/main/java/org/arquillian/algeron/pact/provider/spi/Target.java
// public interface Target {
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      * <p>
//      * Important: Implementators must implements {@link PactProviderExecutionAwareTarget}
//      * <p>
//      * URL configuration is retrieved from PactProviderConfiguration
//      */
//     void testInteraction();
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      * <p>
//      * Important: Implementators must implements {@link PactProviderExecutionAwareTarget}
//      *
//      * @param url
//      *     where provider is deployed
//      */
//     void testInteraction(URL url);
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      *
//      * @param url
//      *     where provider is deployed
//      * @param consumer
//      *     consumer name that generated the interaction
//      * @param interaction
//      *     interaction to be tested
//      */
//     void testInteraction(URL url, String consumer, RequestResponseInteraction interaction);
// 
//     /**
//      * Run {@link au.com.dius.pact.model.RequestResponseInteraction} and perform response verification
//      * <p>
//      * Any exception will be caught by caller and reported as test failure
//      *
//      * @param consumer
//      *     consumer name that generated the interaction
//      * @param interaction
//      *     interaction to be tested
//      */
//     void testInteraction(String consumer, RequestResponseInteraction interaction);
// }
// 
// Path: pact/provider/assertj/src/main/java/org/arquillian/algeron/pact/provider/assertj/PactProviderAssertions.java
// public static PactProviderAssertions assertThat(Target target) {
//     return new PactProviderAssertions(target);
// }


// Path: pact/provider/ftest-container/src/test/java/org/arquillian/algeron/pact/provider/ftest/MyServiceProviderTest.java
import org.arquillian.algeron.pact.provider.spi.Provider;
import org.arquillian.algeron.pact.provider.spi.State;
import org.arquillian.algeron.pact.provider.spi.Target;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.net.URL;
import java.util.Map;
import static org.arquillian.algeron.pact.provider.assertj.PactProviderAssertions.assertThat;

package org.arquillian.algeron.pact.provider.ftest;




@RunWith(Arquillian.class)
@Provider("test_provider")
public class MyServiceProviderTest {

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class).addClass(MyService.class);
    }

    @ArquillianResource
    URL webapp;

    @ArquillianResource
    Target target;

    @State("test state")
    public void testStateMethod(Map<String, Object> params) {
        assertThat(params).containsEntry("name", "Alexandra");
    }

    @Test
    public void should_provide_valid_answers() {
        assertThat(target).withUrl(webapp).satisfiesContract();