public Pair<HttpClient, HttpMethod> generate(HttpParams in) {
            HttpMethod out = new HttpMethodBase()
            {
                private String identifyOutput() {
                    // lookup this header in the outgoing request headers
                    // and use it to identify which response to send back...
                    Header kv = getRequestHeader(FETCH_HEADER);
                    if (kv == null) {
                        return null;
                    }
                    return kv.getValue();
                }

                @Override
                public String getName() {
                    return "MockHttpMethod";
                }

                @Override
                public InputStream getResponseBodyAsStream() {
                    String which = identifyOutput();
                    String src = "";
                    if (which != null) {
                        src = outputMappings.get(which).getFirst();
                    }
                    return new ByteArrayInputStream(src.getBytes());
                }

                @Override
                public String getResponseBodyAsString() {
                    String which = identifyOutput();
                    if (which == null) {
                        return "";
                    }
                    return outputMappings.get(which).getFirst();
                }

                @Override
                public long getResponseContentLength() {
                    String which = identifyOutput();
                    if (which == null) {
                        return -1;
                    }
                    return outputMappings.get(which).getFirst().length();
                }

                @Override
                public String getResponseBodyAsString(int maxlen) {
                    String str = getResponseBodyAsString();
                    if (str == null) {
                        return "";
                    }
                    return str.substring(0, maxlen);
                }

                @Override
                public int getStatusCode() {
                    String which = identifyOutput();
                    if (which == null) {
                        return -1;
                    }
                    return outputMappings.get(which).getSecond();
                }
            };
            return new Pair<HttpClient, HttpMethod>(null, out);
        }