public boolean checkNumberOfGroups(IGrouping grouping, IShift shift) throws ExcepcaoPersistencia {
public boolean checkNumberOfGroups(IGrouping grouping, IShift shift) {
    public boolean checkNumberOfGroups(IGrouping grouping, IShift shift) throws ExcepcaoPersistencia {        if (grouping.getGroupMaximumNumber() == null) {            return true;        }        int numberOfGroups = 0;        if (shift != null) {            numberOfGroups = grouping.readAllStudentGroupsBy(shift).size();        } else {            numberOfGroups = grouping.getStudentGroupsWithoutShift().size();        }        if (numberOfGroups < grouping.getGroupMaximumNumber()) {            return true;        }        return false;    }