delegator.callBeginMethod(request);
// Create a mock HttpURLConnection as it is needed by HttpUnit
// for creating a WebResponse
MockHttpURLConnection connection = new MockHttpURLConnection(
new URL("http://something"));
// Set the values expected by Http Unit. Note: only the test
// cases that have an end method with an HttpUnit WebReponse
// will use the HttpURLConnection.
connection.setExpectedGetHeaderField("HTTP/1.1 200 OK");
connection.setExpectedGetInputStream(
new ByteArrayInputStream("".getBytes()));
// Create a WebResponse object and call the end method
delegator.callEndMethod(request,
new WebResponseObjectFactory(connection));