SchoolEssence schoolEssence =UtilsForTestCases.createValidSchoolEssence();
School school =schoolEssence.createSchool();
this.schoolDAO.save(school);
AcademicYear academicYear = new AcademicYear("2005-2006",school,startDate1,endDate1,"history");
AcademicYear academicYear2 = new AcademicYear("2006-2007",school,startDate1,endDate1,"history");
academicYearDAO.save(academicYear);
academicYearDAO.save(academicYear2);
List <AcademicYear> academicYearList1 = academicYearDAO.getAcademicYearByDescription("2005-2006");
assertEquals(1, academicYearList1.size());
Long id = academicYearList1.get(0).getAcademicYearId();
AcademicYear year = academicYearDAO.get(id);
assertNotNull(year);
assertEquals(id, year.getAcademicYearId());
academicYearList1 = academicYearDAO.getAll();
assertEquals(2, academicYearList1.size());
academicYearList1 = academicYearDAO.getAll("description");