// 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.mbtest.javabank.http.core.Stub;
import java.util.List;
import static com.google.common.collect.Lists.newArrayList;
package org.mbtest.javabank.fluent;




public class StubBuilder implements FluentBuilder {
    private ImposterBuilder parent;
    private List<ResponseBuilder> childResponses = newArrayList();
    private List<PredicateTypeBuilder> childPredicates = newArrayList();

    protected StubBuilder(ImposterBuilder httpImposterBuilder) {
        this.parent = httpImposterBuilder;
    }

    public ResponseBuilder response() {
        ResponseBuilder childResponse = new ResponseBuilder(this);
        childResponses.add(childResponse);
        return childResponse;
    }

    public PredicateTypeBuilder predicate() {
        PredicateTypeBuilder childPredicate = new PredicateTypeBuilder(this);
        childPredicates.add(childPredicate);
        return childPredicate;
    }

    @Override
    public ImposterBuilder end() {
        return parent;
    }

// 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/fluent/StubBuilder.java
import org.mbtest.javabank.http.core.Stub;
import java.util.List;
import static com.google.common.collect.Lists.newArrayList;

package org.mbtest.javabank.fluent;




public class StubBuilder implements FluentBuilder {
    private ImposterBuilder parent;
    private List<ResponseBuilder> childResponses = newArrayList();
    private List<PredicateTypeBuilder> childPredicates = newArrayList();

    protected StubBuilder(ImposterBuilder httpImposterBuilder) {
        this.parent = httpImposterBuilder;
    }

    public ResponseBuilder response() {
        ResponseBuilder childResponse = new ResponseBuilder(this);
        childResponses.add(childResponse);
        return childResponse;
    }

    public PredicateTypeBuilder predicate() {
        PredicateTypeBuilder childPredicate = new PredicateTypeBuilder(this);
        childPredicates.add(childPredicate);
        return childPredicate;
    }

    @Override
    public ImposterBuilder end() {
        return parent;
    }

    protected Stub build() {