Number evaluateOutlierValue(final Number input) {
        switch (outlierTreatmentMethod) {
            case AS_IS:
                KiePMMLLinearNorm[] limitLinearNorms;
                if (input.doubleValue() < firstLinearNorm.getOrig()) {
                    limitLinearNorms = linearNorms.subList(0, 2).toArray(new KiePMMLLinearNorm[0]);
                } else {
                    limitLinearNorms = linearNorms.subList(linearNorms.size() -2, linearNorms.size()).toArray(new KiePMMLLinearNorm[0]);
                }
                return evaluate(input, limitLinearNorms);
            case AS_MISSING_VALUES:
                return mapMissingTo;
            case AS_EXTREME_VALUES:
                return input.doubleValue() < firstLinearNorm.getOrig() ? firstLinearNorm.getNorm() : lastLinearNorm.getNorm();
            default:
                throw new KiePMMLException("Unknown outlierTreatmentMethod " + outlierTreatmentMethod);
        }
    }
@Test
    void evaluateOutlierValueAsExtremeValues() {
        KiePMMLNormContinuous kiePMMLNormContinuous = getKiePMMLNormContinuous(null,
                                                                               OUTLIER_TREATMENT_METHOD.AS_EXTREME_VALUES, null);
        Number input = 23;
        Number retrieved = kiePMMLNormContinuous.evaluateOutlierValue(input);
        assertThat(retrieved).isEqualTo(kiePMMLNormContinuous.linearNorms.get(0).getNorm());
        input = 41;
        retrieved = kiePMMLNormContinuous.evaluateOutlierValue(input);
        assertThat(retrieved).isEqualTo(kiePMMLNormContinuous.linearNorms.get(3).getNorm());
    }