DefaultHttpClient theHttpClient)
throws Throwable
{
// Add the class name, the method name, to the request to simulate and
// automatic session creation flag to the request
RequestDirectives directives = new RequestDirectives(theRequest);
directives.setClassName(getDelegatedTest().getClass().getName());
directives.setMethodName(getCurrentTestName());
directives.setAutoSession(
theRequest.getAutomaticSession() ? "true" : "false");
// Add the wrapped test if it is not equal to our current instance
if (isWrappingATest())
{
directives.setWrappedTestName(getWrappedTestName());
}
// Add the simulated URL (if one has been defined)
if (theRequest.getURL() != null)
{
theRequest.getURL().saveToRequest(theRequest);