// Path: timeout-policy/src/main/java/io/apiman/plugins/timeoutpolicy/beans/TimeoutConfigBean.java
// public class TimeoutConfigBean {
// 
//     @JsonProperty
//     private String timeoutConnect;
// 
//     @JsonProperty
//     private String timeoutRead;
// 
//     public String getTimeoutConnect() {
//         return timeoutConnect;
//     }
// 
//     public void setTimeoutConnect(String timeoutConnect) {
//         this.timeoutConnect = timeoutConnect;
//     }
// 
//     public String getTimeoutRead() {
//         return timeoutRead;
//     }
// 
//     public void setTimeoutRead(String timeoutRead) {
//         this.timeoutRead = timeoutRead;
//     }
// 
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import java.util.HashMap;
import org.junit.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.apiman.gateway.engine.beans.ApiRequest;
import io.apiman.gateway.engine.beans.ApiResponse;
import io.apiman.plugins.timeoutpolicy.beans.TimeoutConfigBean;
import io.apiman.test.policies.ApimanPolicyTest;
import io.apiman.test.policies.BackEndApi;
import io.apiman.test.policies.Configuration;
import io.apiman.test.policies.IPolicyTestBackEndApi;
import io.apiman.test.policies.PolicyFailureError;
import io.apiman.test.policies.PolicyTestBackEndApiResponse;
import io.apiman.test.policies.PolicyTestRequest;
import io.apiman.test.policies.PolicyTestRequestType;
import io.apiman.test.policies.PolicyTestResponse;
import io.apiman.test.policies.TestingPolicy;
package io.apiman.plugins.timeoutpolicy;






/**
 * @author William Beck {@literal <william.beck.pro@gmail.com>}
 */
@TestingPolicy(TimeoutPolicy.class)
public class TimeoutPolicyTest extends ApimanPolicyTest {
    private TimeoutPolicy timeoutPolicy = new TimeoutPolicy();

    /**
     * Control the type of the config bean
     */
    @Test
    @Configuration("{\"timeoutConnect\" : \"1\", \"timeoutRead\" : \"1\" }")
    public void shouldReturnTimeoutConfigBean_onGetConfigurationClass() {
        // WHEN retrieving the configuration class
        Class<?> confClass = timeoutPolicy.getConfigurationClass();

        // THEN it must be the payload bean config
// Path: timeout-policy/src/main/java/io/apiman/plugins/timeoutpolicy/beans/TimeoutConfigBean.java
// public class TimeoutConfigBean {
// 
//     @JsonProperty
//     private String timeoutConnect;
// 
//     @JsonProperty
//     private String timeoutRead;
// 
//     public String getTimeoutConnect() {
//         return timeoutConnect;
//     }
// 
//     public void setTimeoutConnect(String timeoutConnect) {
//         this.timeoutConnect = timeoutConnect;
//     }
// 
//     public String getTimeoutRead() {
//         return timeoutRead;
//     }
// 
//     public void setTimeoutRead(String timeoutRead) {
//         this.timeoutRead = timeoutRead;
//     }
// 
// }


// Path: timeout-policy/src/test/java/io/apiman/plugins/timeoutpolicy/TimeoutPolicyTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import java.util.HashMap;
import org.junit.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.apiman.gateway.engine.beans.ApiRequest;
import io.apiman.gateway.engine.beans.ApiResponse;
import io.apiman.plugins.timeoutpolicy.beans.TimeoutConfigBean;
import io.apiman.test.policies.ApimanPolicyTest;
import io.apiman.test.policies.BackEndApi;
import io.apiman.test.policies.Configuration;
import io.apiman.test.policies.IPolicyTestBackEndApi;
import io.apiman.test.policies.PolicyFailureError;
import io.apiman.test.policies.PolicyTestBackEndApiResponse;
import io.apiman.test.policies.PolicyTestRequest;
import io.apiman.test.policies.PolicyTestRequestType;
import io.apiman.test.policies.PolicyTestResponse;
import io.apiman.test.policies.TestingPolicy;

package io.apiman.plugins.timeoutpolicy;






/**
 * @author William Beck {@literal <william.beck.pro@gmail.com>}
 */
@TestingPolicy(TimeoutPolicy.class)
public class TimeoutPolicyTest extends ApimanPolicyTest {
    private TimeoutPolicy timeoutPolicy = new TimeoutPolicy();

    /**
     * Control the type of the config bean
     */
    @Test
    @Configuration("{\"timeoutConnect\" : \"1\", \"timeoutRead\" : \"1\" }")
    public void shouldReturnTimeoutConfigBean_onGetConfigurationClass() {
        // WHEN retrieving the configuration class
        Class<?> confClass = timeoutPolicy.getConfigurationClass();

        // THEN it must be the payload bean config
        assertEquals(TimeoutConfigBean.class, confClass);