if ( log.isDebugEnabled() ) {
log.debug( "instance of ResponseWrapper" );
}
if ( isNewRequest() ) {
// sanity check, new requests should not have an existing response wrapper
throw new SessionFailedException(
"test recorder failure, requests deemed 'new' should not have previous response wrapper" );
}
setNewResponse( response );
}
else {
if ( log.isDebugEnabled() ) {
log.debug( "NOT instance of ResponseWrapper" );
}
if ( !isNewRequest() ) {
// sanity check, only new requests should need to have the response wrapped
throw new SessionFailedException( "test recorder failure, only new requests should be wrapped" );
}
setNewResponse( new ResponseWrapper( (HttpServletResponse) response ) );
}
}