}
private Response makeTestExecutionReportResponse(Request request, Date resultDate, TestResultRecord testResultRecord) throws Exception {
if (formatIsXML(request))
return generateXMLResponse(testResultRecord.getFile());
ExecutionReport report;
String content = FileUtil.getFileContent(testResultRecord.getFile());
report = ExecutionReport.makeReport(content);
if (report instanceof TestExecutionReport) {
report.setDate(resultDate);
return generateHtmlTestExecutionResponse(request, (TestExecutionReport) report);
} else if (report instanceof SuiteExecutionReport) {
pageTitle.setPageType("Suite History");
return generateHtmlSuiteExecutionResponse(request, (SuiteExecutionReport) report);
} else