### Question:
LegacyLocalReportsDao implements LocalReportsDao { @Override public List<BasicReportDefinition> getReports() { ArrayList<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_legacyLocalReportsDefinition.getReportList()) { resultList.add(report); } return resultList; } LegacyLocalReportsDao(Resource configResource); @Override void loadConfiguration(); @Override void setConfigResource(Resource configResource); @Override Resource getConfigResource(); @Override List<BasicReportDefinition> getReports(); @Override List<BasicReportDefinition> getOnlineReports(); @Override String getReportService(String id); @Override String getDisplayName(String id); void setLegacyLocalReportsDefinition(LegacyLocalReportsDefinition legacyLocalReportsDefinition); LegacyLocalReportsDefinition getLegacyLocalReportsDefinition();  }### Answer:
@Test public void testReportDescription() throws Exception { assertEquals("First report description test", "sample Jasper report using jdbc datasource", m_legacyLocalReportsDao.getReports().get(0).getDescription()); assertEquals("Second report description test", "online sample Jasper report using jdbc datasource", m_legacyLocalReportsDao.getReports().get(1).getDescription()); assertEquals("Third report description test", "NOT online sample Jasper report using jdbc datasource", m_legacyLocalReportsDao.getReports().get(2).getDescription()); }
@Test public void testReportId() throws Exception { assertEquals("First report id test", "sample-report", m_legacyLocalReportsDao.getReports().get(0).getId()); assertEquals("Second report id test", "online-sample-report", m_legacyLocalReportsDao.getReports().get(1).getId()); assertEquals("Third report id test", "not-online-sample-report", m_legacyLocalReportsDao.getReports().get(2).getId()); }
@Test public void testReportRepositoryId() throws Exception { assertNull("First report repository id test", m_legacyLocalReportsDao.getReports().get(0).getRepositoryId()); assertNull("Second report repository id test", m_legacyLocalReportsDao.getReports().get(1).getRepositoryId()); assertNull("Third report repository id test", m_legacyLocalReportsDao.getReports().get(2).getRepositoryId()); }
@Test public void testReportAllowAccess() throws Exception { assertFalse("First report allow access test", m_legacyLocalReportsDao.getReports().get(0).getAllowAccess()); assertFalse("Second report allow access test", m_legacyLocalReportsDao.getReports().get(1).getAllowAccess()); assertFalse("Third report allow access test", m_legacyLocalReportsDao.getReports().get(2).getAllowAccess()); }
@Test public void testReportIsOnline() throws Exception { assertTrue("First report is online test", m_legacyLocalReportsDao.getReports().get(0).getOnline()); assertTrue("Second report is online test", m_legacyLocalReportsDao.getReports().get(1).getOnline()); assertFalse("Third report is online test", m_legacyLocalReportsDao.getReports().get(2).getOnline()); assertFalse("Third report is online test", m_legacyLocalReportsDao.getReports().get(2).getOnline()); }