shift.transferSummary(summary, summaryDate, summaryHour, this.room);
shift.transferSummary(summary, summaryDate, summaryHour, this.room, false);
    public void testEdit() {        Date summaryDate = summary.getSummaryDate();        Date summaryHour = summary.getSummaryHour();        try {            IProfessorship professorshipTest = null;            summary.edit("newTitle", "newSummaryText", 40, false, professorshipTest);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            checkIfSummaryAttributesAreCorrect(this.summary, "title", "summaryText", 20, true, summaryDate,                    summaryHour, this.executionCourse, this.professorship, null, null, this.shift,                    this.room);        }        try {            ITeacher teacherTest = null;            summary.edit("newTitle", "newSummaryText", 40, false, teacherTest);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            checkIfSummaryAttributesAreCorrect(this.summary, "title", "summaryText", 20, true, summaryDate,                    summaryHour, this.executionCourse, this.professorship, null, null, this.shift,                    this.room);        }        try {            String teacherName = null;            summary.edit("newTitle", "newSummaryText", 40, false, teacherName);            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            checkIfSummaryAttributesAreCorrect(this.summary, "title", "summaryText", 20, true, summaryDate,                    summaryHour, this.executionCourse, this.professorship, null, null, this.shift,                    this.room);        }        try {            summary.edit("newTitle", null, 40, null, "");            fail("Expected NullPointerException!");        } catch (NullPointerException e) {            checkIfSummaryAttributesAreCorrect(this.summary, "title", "summaryText", 20, true, summaryDate,                    summaryHour, this.executionCourse, this.professorship, null, null, this.shift,                    this.room);        }        try {            shift.transferSummary(summary, summaryDate, summaryHour, this.room);            fail("Expected DomainException: summary already exists!");        } catch (DomainException e) {            checkIfSummaryAttributesAreCorrect(this.summary, "title", "summaryText", 20, true, summaryDate,                    summaryHour, this.executionCourse, this.professorship, null, null, this.shift,                    this.room);        }        // Edit Summary using Professorship        Date dateBeforeEdition = Calendar.getInstance().getTime();        sleep(1000);        summaryDate = SummaryUtils.createSummaryDate(2005, 5, 6);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        summary.edit("newTitle", "newSummaryText", 40, false, this.professorship);        sleep(1000);        Date dateAfterEdition = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(this.summary, "newTitle", "newSummaryText", 40, false, summaryDate,                summaryHour, this.executionCourse, this.professorship, null, null, this.shift, this.room);        checkSummaryModificationDate(this.summary, dateBeforeEdition, dateAfterEdition);        assertEquals("Unexpected Shift Summary size!", 1, shift.getAssociatedSummariesCount());        // Edit Summary using Teacher        dateBeforeEdition = Calendar.getInstance().getTime();        sleep(1000);        summaryDate = SummaryUtils.createSummaryDate(2005, 5, 7);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        summary.edit("newTitle2", "newSummaryText2", 30, false, this.teacher);        sleep(1000);        dateAfterEdition = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(this.summary, "newTitle2", "newSummaryText2", 30, false, summaryDate,                summaryHour, this.executionCourse, null, this.teacher, null, this.shift, this.room);        checkSummaryModificationDate(this.summary, dateBeforeEdition, dateAfterEdition);        assertEquals("Unexpected Shift Summary size!", 1, shift.getAssociatedSummariesCount());        // Edit Summary using TeacherNumber        dateBeforeEdition = Calendar.getInstance().getTime();        sleep(1000);        summaryDate = SummaryUtils.createSummaryDate(2005, 5, 8);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        shift.transferSummary(summary, summaryDate, summaryHour, this.room);        summary.edit("newTitle3", "newSummaryText3", 40, true, "JPNF");        sleep(1000);        dateAfterEdition = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(this.summary, "newTitle3", "newSummaryText3", 40, true, summaryDate,                summaryHour, this.executionCourse, null, null, "JPNF", this.shift, this.room);        checkSummaryModificationDate(this.summary, dateBeforeEdition, dateAfterEdition);        assertEquals("Unexpected Shift Summary size!", 1, shift.getAssociatedSummariesCount());        // Change Summary Shift        IShift alternativeShift = new Shift();        alternativeShift.setIdInternal(2);        dateBeforeEdition = Calendar.getInstance().getTime();        sleep(1000);        summaryDate = SummaryUtils.createSummaryDate(2005, 5, 10);        summaryHour = SummaryUtils.createSummaryHour(11, 0);        alternativeShift.transferSummary(summary, summaryDate, summaryHour, this.room);        summary.edit("newTitle3", "newSummaryText3", 40, true, "JPNF");        sleep(1000);        dateAfterEdition = Calendar.getInstance().getTime();        checkIfSummaryAttributesAreCorrect(this.summary, "newTitle3", "newSummaryText3", 40, true, summaryDate,                summaryHour, this.executionCourse, null, null, "JPNF", alternativeShift, this.room);        checkSummaryModificationDate(this.summary, dateBeforeEdition, dateAfterEdition);        assertEquals("Unexpected Shift Summary size!", 0, shift.getAssociatedSummariesCount());        assertEquals("Unexpected Alternative Shift Summary size!", 1, alternativeShift.getAssociatedSummariesCount());    }