String consoleStream = stream.text();
if (STDOUT.equalsIgnoreCase(consoleStream)) {
stream.addToBody("<hr/>" + label("Console Output") + "<hr/>");
stream.addToBody("<pre/>" + out.toString() + "</pre>");
} else if (STDERR.equalsIgnoreCase(consoleStream)) {
stream.addToBody("<hr/>" + label("Console Error") + "<hr/>");
stream.addToBody("<pre/>" + err.toString() + "</pre>");
} else {
throw new FitFailureException("Don't know how to process "
+ consoleStream
+ ", valid values are: <pre>stdout, stderr</pre>");