List<Report> reportList = new ArrayList<Report>();
reportList.add(report);
ReportDAO mockedReportDAO = mock(ReportDAO.class);
ViewReportListAction viewReportListAction = new ViewReportListAction();
viewReportListAction.setReportDAO(mockedReportDAO);
when(mockedReportDAO.findAll()).thenReturn(reportList);
// with this, report.getReportType().getType() is called in ReportView(index, report)
// which NullPointerException as there is no ReportType for report object.
String successString = viewReportListAction.displayReportList();