shift.transferSummary(summary, summaryDate, summaryHour, this.room);
shift.transferSummary(summary, summaryDate, summaryHour, this.room, true);
    public void testCreateSummary() {        ISummary summary;        Date summaryDate;        Date summaryHour;        Date dateBeforeCreation;        Date dateAfterCreation;        try {            IProfessorship professorshipTest = null;            executionCourse.createSummary("title", "summaryText", 20, true, professorshipTest);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            assertEquals("Unexpected size in associated summaries!", 0, executionCourse                    .getAssociatedSummariesCount());        }        try {            ITeacher teacherTest = null;            executionCourse.createSummary("title", "summaryText", 20, true, teacherTest);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            assertEquals("Unexpected size in associated summaries!", 0, executionCourse                    .getAssociatedSummariesCount());        }        try {            String teacherNameTest = null;            executionCourse.createSummary("title", "summaryText", 20, true, teacherNameTest);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            assertEquals("Unexpected size in associated summaries!", 0, executionCourse                    .getAssociatedSummariesCount());        }        try {            executionCourse.createSummary(null, "summaryText", null, true, this.professorship);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            assertEquals("Unexpected size in associated summaries!", 0, executionCourse                    .getAssociatedSummariesCount());        }        try {            executionCourse.createSummary("title", null, 20, null, this.professorship);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            assertEquals("Unexpected size in associated summaries!", 0, executionCourse                    .getAssociatedSummariesCount());        }        // Create Summary using Professorship        summaryDate = SummaryUtils.createSummaryDate(2005, 5, 5);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        dateBeforeCreation = Calendar.getInstance().getTime();        sleep(1000);        summary = executionCourse.createSummary("title", "summaryText", 20, true, this.professorship);        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        sleep(1000);        dateAfterCreation = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(summary, "title", "summaryText", 20, true, summaryDate,                summaryHour, this.executionCourse, this.professorship, null, null, this.shift, this.room);        checkSummaryModificationDate(summary, dateBeforeCreation, dateAfterCreation);        assertEquals("Unexpected size in associated summaries!", 1, executionCourse                .getAssociatedSummariesCount());        assertEquals("Unexpected size in associated summaries!", 1, shift.getAssociatedSummariesCount());        // Try to insert a summary to a shift that already exit        try {            shift.transferSummary(summary, summaryDate, summaryHour, this.room);            fail("Expected DomainException: summary already exist!");        } catch (DomainException e) {            assertEquals("Unexpected size in associated summaries!", 1, executionCourse                    .getAssociatedSummariesCount());            assertEquals("Unexpected size in associated summaries!", 1, shift                    .getAssociatedSummariesCount());        }        // Create Summary using Teacher        summaryDate = SummaryUtils.createSummaryDate(2005, 6, 5);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        dateBeforeCreation = Calendar.getInstance().getTime();        sleep(1000);        summary = executionCourse.createSummary("title", "summaryText", 20, true, this.teacher);        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        sleep(1000);        dateAfterCreation = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(summary, "title", "summaryText", 20, true, summaryDate,                summaryHour, this.executionCourse, null, this.teacher, null, this.shift, this.room);        checkSummaryModificationDate(summary, dateBeforeCreation, dateAfterCreation);        assertEquals("Unexpected size in associated summaries!", 2, executionCourse                .getAssociatedSummariesCount());        assertEquals("Unexpected size in associated summaries!", 2, shift.getAssociatedSummariesCount());        // Create Summary using TeacherName        summaryDate = SummaryUtils.createSummaryDate(2005, 8, 5);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        dateBeforeCreation = Calendar.getInstance().getTime();        sleep(1000);        summary = executionCourse.createSummary("title", "summaryText", 20, true, "JPNF");        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        sleep(1000);        dateAfterCreation = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(summary, "title", "summaryText", 20, true, summaryDate,                summaryHour, this.executionCourse, null, null, "JPNF", this.shift, this.room);        checkSummaryModificationDate(summary, dateBeforeCreation, dateAfterCreation);        assertEquals("Unexpected size in associated summaries!", 3, executionCourse                .getAssociatedSummariesCount());        assertEquals("Unexpected size in associated summaries!", 3, shift.getAssociatedSummariesCount());    }