fail("Expected DomainExpected");
assertEquals("Size UnExpected", 3, grouping.getStudentGroupsCount()); assertEquals("Size UnExpected", 2, grouping.getStudentGroupsWithoutShift().size()); assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithShift().size());
    public void testCreateStudentGroup() {        try {            grouping.createStudentGroup(null, null, null);            fail("Expected NullPointerException");        } catch (NullPointerException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        List<IStudent> students = new ArrayList();        students.add(student3);        students.add(student4);        try {            grouping.createStudentGroup(null, 1, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        students.clear();        students.add(student2);        students.add(student3);        try {            grouping.createStudentGroup(null, 2, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        students.clear();        students.add(student3);        students.add(student5);        try {            grouping.createStudentGroup(null, 2, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        students.clear();        students.add(student3);        try {            grouping.createStudentGroup(null, 2, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        students.clear();        students.add(student3);        students.add(student4);        students.add(student6);        students.add(student7);        try {            grouping.createStudentGroup(null, 2, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsCount());            assertEquals("StudentGroup UnExpected", studentGroup, grouping.getStudentGroups().get(0));        }        students.clear();        students.add(student3);        students.add(student4);        try {            grouping.createStudentGroup(null, 2, students);        } catch (DomainException e) {            fail("UnExpected DomainExpected");        }        assertEquals("Size UnExpected", 2, grouping.getStudentGroupsCount());        assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithoutShift().size());        assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithShift().size());        assertEquals("GroupNumber UnExpected", 1, grouping.getStudentGroups().get(1).getGroupNumber()                .intValue());        assertEquals("GroupNumber UnExpected", 2, grouping.getStudentGroups().get(0).getGroupNumber()                .intValue());        assertEquals("Attend UnExpected", attend3, grouping.getStudentGroups().get(0).getAttends()                .get(0));        assertEquals("Attend UnExpected", attend4, grouping.getStudentGroups().get(0).getAttends()                .get(1));        assertEquals("Attend UnExpected", attend, grouping.getStudentGroups().get(1).getAttends().get(0));        assertEquals("Attend UnExpected", attend2, grouping.getStudentGroups().get(1).getAttends()                .get(1));        students.clear();        students.add(student6);        students.add(student7);        try {            grouping.createStudentGroup(null, 3, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 2, grouping.getStudentGroupsCount());            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithoutShift().size());            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithShift().size());        }        students.clear();        students.add(student6);        students.add(student7);        try {            grouping.createStudentGroup(shift2, 3, students);            fail("Expected DomainExpected");        } catch (DomainException e) {            assertEquals("Size UnExpected", 2, grouping.getStudentGroupsCount());            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithoutShift().size());            assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithShift().size());        }        studentGroup.setShift(null);        studentGroup.setGrouping(null);        try {            grouping.createStudentGroup(shift2, 3, students);        } catch (DomainException e) {            fail("UnExpected DomainExpected");        }        assertEquals("Size UnExpected", 2, grouping.getStudentGroupsCount());        assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithoutShift().size());        assertEquals("Size UnExpected", 1, grouping.getStudentGroupsWithShift().size());    }