// Path: client/src/main/java/com/nesscomputing/httpclient/internal/HttpClientHeader.java
// @Immutable
// public class HttpClientHeader
// {
//     private final String name;
//     private final String value;
// 
//     /**
//      * Create a new header.
// 	 * @param name header name
// 	 * @param value header value
// 	 */
//     public HttpClientHeader(final String name, final String value)
//     {
//         this.name = name;
//         this.value = value;
//     }
// 
//     /**
//      * @return the header name.
//      */
//     public String getName()
//     {
//         return name;
//     }
// 
//     /**
//      * @return the header value.
//      */
//     public String getValue()
//     {
//         return value;
//     }
// }


import org.eclipse.jetty.server.handler.AbstractHandler;
import com.nesscomputing.httpclient.internal.HttpClientHeader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request;
    private String requestURI = null;
    private int status = HttpServletResponse.SC_OK;

    private List<HttpClientHeader> headers = new ArrayList<HttpClientHeader>();

    @SuppressWarnings("unchecked")
    @Override
    public void handle(final String target,
            final Request request,
            final HttpServletRequest httpRequest,
            final HttpServletResponse httpResponse)
    throws IOException, ServletException
    {
        method = request.getMethod();

        requestURI = request.getRequestURI();

        httpResponse.setContentType(contentType);
        httpResponse.setStatus(status);
        status = HttpServletResponse.SC_OK;

        for (final HttpClientHeader header: headers) {
            httpResponse.addHeader(header.getName(), header.getValue());
        }

        for (Enumeration<String> e = request.getHeaderNames(); e.hasMoreElements(); ) {
            String headerName = e.nextElement();
            List<HttpClientHeader> headers = reqHeaders.get(headerName);
            if (headers == null) {
                headers = new ArrayList<HttpClientHeader>();
// Path: client/src/main/java/com/nesscomputing/httpclient/internal/HttpClientHeader.java
// @Immutable
// public class HttpClientHeader
// {
//     private final String name;
//     private final String value;
// 
//     /**
//      * Create a new header.
// 	 * @param name header name
// 	 * @param value header value
// 	 */
//     public HttpClientHeader(final String name, final String value)
//     {
//         this.name = name;
//         this.value = value;
//     }
// 
//     /**
//      * @return the header name.
//      */
//     public String getName()
//     {
//         return name;
//     }
// 
//     /**
//      * @return the header value.
//      */
//     public String getValue()
//     {
//         return value;
//     }
// }


// Path: client/src/test/java/com/nesscomputing/httpclient/testsupport/GenericTestHandler.java
import org.eclipse.jetty.server.handler.AbstractHandler;
import com.nesscomputing.httpclient.internal.HttpClientHeader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request;

    private String requestURI = null;
    private int status = HttpServletResponse.SC_OK;

    private List<HttpClientHeader> headers = new ArrayList<HttpClientHeader>();

    @SuppressWarnings("unchecked")
    @Override
    public void handle(final String target,
            final Request request,
            final HttpServletRequest httpRequest,
            final HttpServletResponse httpResponse)
    throws IOException, ServletException
    {
        method = request.getMethod();

        requestURI = request.getRequestURI();

        httpResponse.setContentType(contentType);
        httpResponse.setStatus(status);
        status = HttpServletResponse.SC_OK;

        for (final HttpClientHeader header: headers) {
            httpResponse.addHeader(header.getName(), header.getValue());
        }

        for (Enumeration<String> e = request.getHeaderNames(); e.hasMoreElements(); ) {
            String headerName = e.nextElement();
            List<HttpClientHeader> headers = reqHeaders.get(headerName);
            if (headers == null) {
                headers = new ArrayList<HttpClientHeader>();
                reqHeaders.put(headerName, headers);