throw new NotAuthorizedException();
}
final Attends userAttend = grouping.getStudentAttend(userStudent);
if (userAttend == null) {
throw new InvalidStudentNumberServiceException();
}
if (strategy.checkAlreadyEnroled(grouping, studentUsername)) {
throw new InvalidSituationServiceException();
}
StudentGroup newStudentGroup = grouping.readStudentGroupBy(groupNumber);
if (newStudentGroup != null) {
throw new FenixServiceException();
}
if (!strategy.checkStudentsUserNamesInGrouping(studentUsernames, grouping)) {
throw new InvalidStudentNumberServiceException();
}
checkStudentUsernamesAlreadyEnroledInStudentGroup(strategy, studentUsernames, grouping);
newStudentGroup = new StudentGroup(groupNumber, grouping, shift);
for (final String studentUsernameIter : studentUsernames) {