boolean succeed = statusCode == definition.getExpectedStatusCode();
result.setSucceed(succeed);
HttpEntity entity = response.getEntity();
HttpOutputThread outputThread = new HttpOutputThread(request, entity, maxCaptureSize,
definition.isSkipOutput());
outputThread.start();
if (definition.getTimeoutMs() > 0) {
HttpTimeoutThread timeoutThread = new HttpTimeoutThread(outputThread, definition.getTimeoutMs());
timeoutThread.start();
}
outputThread.join();
result.setOutput(outputThread.composeActionOutput());
return result;
}