final List<AcademicTermDetail> academicTermDetail = eventAggregationManagementDao.getAcademicTermDetails();
assertEquals(0, academicTermDetail.size());
List<AcademicTermDetail> academicTermDetails = new ArrayList<AcademicTermDetail>();
academicTermDetails.add(new AcademicTermDetailImpl(new DateMidnight(2012, 1, 1), new DateMidnight(2012, 6, 1), "Spring 2012"));
academicTermDetails.add(new AcademicTermDetailImpl(new DateMidnight(2012, 6, 1), new DateMidnight(2012, 9, 1), "Summer 2012"));
academicTermDetails.add(new AcademicTermDetailImpl(new DateMidnight(2012, 9, 1), new DateMidnight(2013, 1, 1), "Fall 2012"));
eventAggregationManagementDao.setAcademicTermDetails(academicTermDetails);
}
});
try {
this.executeInTransaction(new CallableWithoutResult() {
@Override
protected void callWithoutResult() {
final List<AcademicTermDetail> academicTermDetail = eventAggregationManagementDao.getAcademicTermDetails();
assertEquals(3, academicTermDetail.size());
academicTermDetail.add(new AcademicTermDetailImpl(new DateMidnight(2012, 1, 1), new DateMidnight(2013, 6, 1), "Spring 2013"));
try {
eventAggregationManagementDao.setAcademicTermDetails(academicTermDetail);
fail();
}