// Path: jsonp-policy/src/main/java/io/apiman/plugins/jsonp_policy/beans/JsonpConfigBean.java
// public class JsonpConfigBean {
// 
// 	@JsonProperty
//     private String callbackParamName;
// 
//     /**
//      * @return the parameter name used to specify the callback function 
//      */
//     public String getCallbackParamName() {
//         return callbackParamName;
//     }
// 
//     /**
//      * @param callbackParamName the parameter name used to specify the callback function
//      */
//     public void setCallbackParamName(String callbackParamName) {
//         this.callbackParamName = callbackParamName;
//     }
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.mockito.Matchers.refEq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import io.apiman.gateway.engine.async.IAsyncHandler;
import io.apiman.gateway.engine.beans.ApiRequest;
import io.apiman.gateway.engine.beans.ApiResponse;
import io.apiman.gateway.engine.beans.util.QueryMap;
import io.apiman.gateway.engine.components.IBufferFactoryComponent;
import io.apiman.gateway.engine.io.ByteBuffer;
import io.apiman.gateway.engine.io.IApimanBuffer;
import io.apiman.gateway.engine.io.IReadWriteStream;
import io.apiman.gateway.engine.policy.IPolicyChain;
import io.apiman.gateway.engine.policy.IPolicyContext;
import io.apiman.gateway.engine.policy.PolicyContextImpl;
import io.apiman.plugins.jsonp_policy.beans.JsonpConfigBean;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
package io.apiman.plugins.jsonp_policy;




@SuppressWarnings("nls")
public class JsonpPolicyTest {

    private JsonpPolicy jsonpPolicy;

    @Spy
    private IPolicyContext sContext = new PolicyContextImpl(null);

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        Mockito.doReturn(new TestBufferFactory()).when(sContext).getComponent(IBufferFactoryComponent.class);

        jsonpPolicy = new JsonpPolicy();
    }

    @Test
    public void testParseEmptyConfiguration() {
        // given
        String config = "{}";
        // when
// Path: jsonp-policy/src/main/java/io/apiman/plugins/jsonp_policy/beans/JsonpConfigBean.java
// public class JsonpConfigBean {
// 
// 	@JsonProperty
//     private String callbackParamName;
// 
//     /**
//      * @return the parameter name used to specify the callback function 
//      */
//     public String getCallbackParamName() {
//         return callbackParamName;
//     }
// 
//     /**
//      * @param callbackParamName the parameter name used to specify the callback function
//      */
//     public void setCallbackParamName(String callbackParamName) {
//         this.callbackParamName = callbackParamName;
//     }
// }


// Path: jsonp-policy/src/test/java/io/apiman/plugins/jsonp_policy/JsonpPolicyTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.mockito.Matchers.refEq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import io.apiman.gateway.engine.async.IAsyncHandler;
import io.apiman.gateway.engine.beans.ApiRequest;
import io.apiman.gateway.engine.beans.ApiResponse;
import io.apiman.gateway.engine.beans.util.QueryMap;
import io.apiman.gateway.engine.components.IBufferFactoryComponent;
import io.apiman.gateway.engine.io.ByteBuffer;
import io.apiman.gateway.engine.io.IApimanBuffer;
import io.apiman.gateway.engine.io.IReadWriteStream;
import io.apiman.gateway.engine.policy.IPolicyChain;
import io.apiman.gateway.engine.policy.IPolicyContext;
import io.apiman.gateway.engine.policy.PolicyContextImpl;
import io.apiman.plugins.jsonp_policy.beans.JsonpConfigBean;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;

package io.apiman.plugins.jsonp_policy;




@SuppressWarnings("nls")
public class JsonpPolicyTest {

    private JsonpPolicy jsonpPolicy;

    @Spy
    private IPolicyContext sContext = new PolicyContextImpl(null);

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        Mockito.doReturn(new TestBufferFactory()).when(sContext).getComponent(IBufferFactoryComponent.class);

        jsonpPolicy = new JsonpPolicy();
    }

    @Test
    public void testParseEmptyConfiguration() {
        // given
        String config = "{}";
        // when
        JsonpConfigBean jsonpConfig = jsonpPolicy.parseConfiguration(config);