@Override
    public Object evaluate(final Map<String, Object> requestData,
                           final PMMLRuntimeContext context) {
        final List<KiePMMLDefineFunction> defineFunctions = transformationDictionary != null ?
                transformationDictionary.getDefineFunctions() : Collections.emptyList();
        final List<KiePMMLDerivedField> derivedFields = new ArrayList<>();
        if (transformationDictionary != null) {
            derivedFields.addAll(transformationDictionary.getDerivedFields());
        }
        if (localTransformations != null) {
            derivedFields.addAll(localTransformations.getDerivedFields());
        }
        return characteristics.evaluate(defineFunctions, derivedFields, kiePMMLOutputFields, requestData,
                                        context,
                                        initialScore,
                                        reasonCodeAlgorithm,
                                        useReasonCodes,
                                        baselineScore).orElse(null);
    }
@Test
    void evaluate() {
        Double initialScore = 25.23;
        PMMLRuntimeContextTest pmmlContextTest = new PMMLRuntimeContextTest();
        KiePMMLScorecardModel kiePMMLScorecardModel = new KiePMMLScorecardModel("FILENAME",
                                                                                MODEL_NAME,
                                                                                Collections.emptyList(),
                                                                                getKiePMMLCharacteristics(),
                                                                                initialScore,
                                                                                true,
                                                                                REASONCODE_ALGORITHM.POINTS_BELOW,
                                                                                0);
        Object retrieved = kiePMMLScorecardModel.evaluate(Collections.emptyMap(), pmmlContextTest);
        assertThat(retrieved).isNotNull();

        Double EVALUATION_20 = baselineScore - value2;
        Double EVALUATION_11 = baselineScore - value1;
        Double expected = initialScore + value2 + value1 + 1;
        assertThat(retrieved).isEqualTo(expected);
        final Map<String, Object> outputFieldsMap = pmmlContextTest.getOutputFieldsMap();
        assertThat(outputFieldsMap).hasSize(2);
        assertThat(outputFieldsMap).containsKey("REASON_CODE_20");
        assertThat(outputFieldsMap.get("REASON_CODE_20")).isEqualTo(EVALUATION_20);
        assertThat(outputFieldsMap).containsKey("REASON_CODE_11");
        assertThat(outputFieldsMap.get("REASON_CODE_11")).isEqualTo(EVALUATION_11);
    }