// Path: javabank-core/src/main/java/org/mbtest/javabank/http/core/Stub.java
// public class Stub extends HashMap {
// 
//     private static final String RESPONSES = "responses";
//     private static final String PREDICATES = "predicates";
// 
//     public Stub() {
//         this.put(RESPONSES, newArrayList());
//         this.put(PREDICATES, newArrayList());
//     }
// 
//     public Stub withResponse(Is response) {
//         getResponses().clear();
//         getResponses().add(response);
// 
//         return this;
//     }
// 
//     public Stub addResponse(Response response) {
//         getResponses().add(response);
// 
//         return this;
//     }
// 
//     public Stub addPredicates(List<Predicate> predicates) {
//         getPredicates().addAll(predicates);
//         return this;
//     }
// 
//     public List<Response> getResponses() {
//         return (List<Response>) this.get(RESPONSES);
//     }
// 
//     public List<Predicate> getPredicates() {
//         return (List<Predicate>) this.get(PREDICATES);
//     }
// 
//     public HashMap getResponse(int index) {
//         return getResponses().get(index);
//     }
// 
//     public Predicate getPredicate(int index) {
//         return getPredicates().get(index);
//     }
// }


import org.json.simple.JSONObject;
import org.mbtest.javabank.http.core.Stub;
import java.util.HashMap;
import java.util.List;
import static com.google.common.collect.Lists.newArrayList;
package org.mbtest.javabank.http.imposters;




public class Imposter extends HashMap {
    private static final String PORT = "port";
    private static final String PROTOCOL = "protocol";
    private static final String STUBS = "stubs";

    public Imposter() {
        this.put(PROTOCOL, "http");
        this.put(STUBS, newArrayList());
    }

    public static Imposter fromJSON(JSONObject json) {
        Imposter imposter = new Imposter();
        imposter.putAll(json);

        return imposter;
    }

    public static Imposter anImposter() {
        return new Imposter();
    }

    public Imposter onPort(int port) {
        this.put(PORT, port);
        return this;
    }

// Path: javabank-core/src/main/java/org/mbtest/javabank/http/core/Stub.java
// public class Stub extends HashMap {
// 
//     private static final String RESPONSES = "responses";
//     private static final String PREDICATES = "predicates";
// 
//     public Stub() {
//         this.put(RESPONSES, newArrayList());
//         this.put(PREDICATES, newArrayList());
//     }
// 
//     public Stub withResponse(Is response) {
//         getResponses().clear();
//         getResponses().add(response);
// 
//         return this;
//     }
// 
//     public Stub addResponse(Response response) {
//         getResponses().add(response);
// 
//         return this;
//     }
// 
//     public Stub addPredicates(List<Predicate> predicates) {
//         getPredicates().addAll(predicates);
//         return this;
//     }
// 
//     public List<Response> getResponses() {
//         return (List<Response>) this.get(RESPONSES);
//     }
// 
//     public List<Predicate> getPredicates() {
//         return (List<Predicate>) this.get(PREDICATES);
//     }
// 
//     public HashMap getResponse(int index) {
//         return getResponses().get(index);
//     }
// 
//     public Predicate getPredicate(int index) {
//         return getPredicates().get(index);
//     }
// }


// Path: javabank-core/src/main/java/org/mbtest/javabank/http/imposters/Imposter.java
import org.json.simple.JSONObject;
import org.mbtest.javabank.http.core.Stub;
import java.util.HashMap;
import java.util.List;
import static com.google.common.collect.Lists.newArrayList;

package org.mbtest.javabank.http.imposters;




public class Imposter extends HashMap {
    private static final String PORT = "port";
    private static final String PROTOCOL = "protocol";
    private static final String STUBS = "stubs";

    public Imposter() {
        this.put(PROTOCOL, "http");
        this.put(STUBS, newArrayList());
    }

    public static Imposter fromJSON(JSONObject json) {
        Imposter imposter = new Imposter();
        imposter.putAll(json);

        return imposter;
    }

    public static Imposter anImposter() {
        return new Imposter();
    }

    public Imposter onPort(int port) {
        this.put(PORT, port);
        return this;
    }

    public Imposter addStub(Stub stub) {