exam = new Exam(null, null, null, null, null, null, null, null);
final List<IExecutionCourse> executionCourses = new ArrayList<IExecutionCourse>(); executionCourses.add(executionCourse1); executionCourses.add(executionCourse2);  final List<ICurricularCourseScope> curricularCourseScopes = new ArrayList<ICurricularCourseScope>(); curricularCourseScopes.add(curricularCourseScope);  exam = new Exam(createDate(2005, 9, 15), startTime.getTime(), endTime.getTime(), executionCourses, curricularCourseScopes, null, null, season);
    private void setupTestData() {        IExecutionCourse executionCourse1 = new ExecutionCourse();        executionCourse1.setIdInternal(1);        IExecutionCourse executionCourse2 = new ExecutionCourse();        executionCourse2.setIdInternal(2);        curricularCourse = new CurricularCourse();        curricularCourse.setIdInternal(1);        curricularCourse.addAssociatedExecutionCourses(executionCourse1);        curricularCourse.addAssociatedExecutionCourses(executionCourse2);        curricularCourseScope = new CurricularCourseScope();        curricularCourseScope.setIdInternal(1);        curricularCourseScope.setCurricularCourse(curricularCourse);        Calendar startTime = createHour(10, 0);        Calendar endTime = createHour(13, 0);        exam = new Exam(null, null, null, null, null, null, null, null);        exam.setIdInternal(1);        exam.setDayDate(createDate(2005, 9, 15));        exam.setBeginningDate(startTime.getTime());        exam.setEndDate(endTime.getTime());        exam.setSeason(season);        exam.addAssociatedExecutionCourses(executionCourse1);        exam.addAssociatedExecutionCourses(executionCourse2);        exam.addAssociatedCurricularCourseScope(curricularCourseScope);        period = new Period(startTime.getTime(), endTime.getTime());        IRoom room1 = new Room();        room1.setIdInternal(1);        IRoom room2 = new Room();        room2.setIdInternal(2);        DiaSemana dayOfWeek = new DiaSemana(exam.getDay().get(Calendar.DAY_OF_WEEK));        room1.createRoomOccupation(period, startTime, endTime, dayOfWeek, RoomOccupation.DIARIA, null,                exam);        room2.createRoomOccupation(period, startTime, endTime, dayOfWeek, RoomOccupation.DIARIA, null,                exam);        // Student Enrolled in exam        IWrittenEvaluationEnrolment writtenEvaluationEnrolment = new WrittenEvaluationEnrolment();        writtenEvaluationEnrolment.setIdInternal(1);        IStudent student = new Student();        student.setIdInternal(1);        writtenEvaluationEnrolment.setWrittenEvaluation(exam);        writtenEvaluationEnrolment.setStudent(student);        writtenEvaluationEnrolment.setRoom(room1);        // Domain entities used by Create and Edit        executionCoursesToAssociate = new ArrayList<IExecutionCourse>(1);        final ExecutionCourse executionCourseToAssociate = new ExecutionCourse();        executionCourseToAssociate.setIdInternal(3);        executionCourseToAssociate.addAssociatedCurricularCourses(curricularCourse);        executionCoursesToAssociate.add(executionCourseToAssociate);        otherExam = new Exam(null, null, null, null, null, null, null, null);        otherExam.setIdInternal(2);        otherExam.setSeason(season);        otherExam.addAssociatedExecutionCourses(executionCourseToAssociate);        otherExam.addAssociatedCurricularCourseScope(curricularCourseScope);        curricularCourseScopesToAssociate = new ArrayList<ICurricularCourseScope>(1);        curricularCourseScopesToAssociate.add(curricularCourseScope);        rooms = new ArrayList<IRoom>(2);        IRoom roomToAssociate1 = new Room();        roomToAssociate1.setIdInternal(3);        IRoom roomToAssociate2 = new Room();        roomToAssociate2.setIdInternal(4);        rooms.add(roomToAssociate1);        rooms.add(roomToAssociate2);        examDate = createDate(2005, 10, 10);        examStartTime = createHour(10, 0);        examEndTime = createHour(10, 0);    }