List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutSpecialSituations(occupationPeriod
List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutEndSituations(occupationPeriod
    public int getMandatoryLessonHours(ExecutionPeriod executionPeriod) {        OccupationPeriod occupationPeriod = getLessonsPeriod(executionPeriod);        if (occupationPeriod == null) {            return 0;        }        List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutSpecialSituations(occupationPeriod                .getStart(), occupationPeriod.getEnd());        if (list.isEmpty()) {            return 0;        } else {            List<TeacherServiceExemption> exemptions = getServiceExemptionSituations(occupationPeriod                    .getStart(), occupationPeriod.getEnd());            TeacherServiceExemption teacherServiceExemption = chooseOneServiceExemption(exemptions,                    executionPeriod);            if (isServiceExemptionToCountZero(teacherServiceExemption)) {                return 0;            }            Collections.sort(list, new BeanComparator("beginDate"));            final Integer hours = list.get(list.size() - 1).getLessonHours();            return (hours == null) ? 0 : hours.intValue();        }    }