result = strategy.checkPossibleToEnrolInExistingGroup(groupProperties, studentGroup, studentGroup.getShift());
result = strategy.checkPossibleToEnrolInExistingGroup(groupProperties, studentGroup);
    private boolean checkGroupStudentEnrolment(Integer studentGroupCode, String username)            throws FenixServiceException {        boolean result = false;        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IStudentGroup studentGroup = (IStudentGroup) sp.getIPersistentStudentGroup().readByOID(                    StudentGroup.class, studentGroupCode);            if (studentGroup == null) {                throw new FenixServiceException();            }            IGrouping groupProperties = studentGroup.getGrouping();            IGroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory                    .getInstance();            IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory                    .getGroupEnrolmentStrategyInstance(groupProperties);            if (!strategy.checkStudentInGrouping(groupProperties, username)) {                throw new NotAuthorizedException();            }            result = strategy.checkAlreadyEnroled(groupProperties, username);            if (result)                throw new InvalidSituationServiceException();            result = strategy.checkPossibleToEnrolInExistingGroup(groupProperties, studentGroup,                    studentGroup.getShift());            if (!result)                throw new InvalidArgumentsServiceException();        } catch (ExcepcaoPersistencia ex) {            ex.printStackTrace();        }        return true;    }