protected WebResponse execAndAssert(WebRequest request, String expectedUri) throws Exception {
    WebResponse rsp = sc.getResponse( request );

    assertEquals(HttpStatus.SC_OK,rsp.getResponseCode());
    //HttpUnit doesn't pass the message; not a big deal
    //assertEquals("TESTREASON",rsp.getResponseMessage());
    final String text = rsp.getText();
    assertTrue(text.startsWith("REQUESTLINE:"));

    String expectedTargetUri = getExpectedTargetUri(request, expectedUri);
    String expectedFirstLine = "REQUESTLINE: "+(request instanceof GetMethodWebRequest ? "GET" : "POST");
    expectedFirstLine += " " + expectedTargetUri + " HTTP/1.1";

    String firstTextLine = text.substring(0,text.indexOf(System.getProperty("line.separator")));

    assertEquals(expectedFirstLine, firstTextLine);

    // Assert all headers are present, and therefore checks the case has been preserved (see GH #65)
    Dictionary headers = request.getHeaders();
    Enumeration headerNameEnum = headers.keys();
    while (headerNameEnum.hasMoreElements()) {
      String headerName = (String) headerNameEnum.nextElement();
      assertTrue(text.contains(headerName));
    }

    return rsp;
  }
If we're proxying a remote service that tries to set cookies, we need to make sure the cookies are not captured
by the httpclient in the ProxyServlet, otherwise later requests from ALL users will all access the remote proxy
with the same cookie as the first user
src/test/java/org/mitre/dsmiley/httpproxy/ProxyServletTest.java