public Object evaluate(final ProcessingDTO processingDTO,
                           final List<Object> paramValues) {
        final List<KiePMMLNameValue> kiePMMLNameValues = new ArrayList<>();
        if (parameterFields != null) {
            if (paramValues == null || paramValues.size() < parameterFields.size()) {
                throw new IllegalArgumentException("Expected at least " + parameterFields.size() + " arguments for " + name + " DefineFunction");
            }
            for (int i = 0; i < parameterFields.size(); i++) {
                kiePMMLNameValues.add(new KiePMMLNameValue(parameterFields.get(i).getName(), paramValues.get(i)));
            }
        }
        for (KiePMMLNameValue kiePMMLNameValue : kiePMMLNameValues) {
            processingDTO.addKiePMMLNameValue(kiePMMLNameValue);
        }
        return commonEvaluate(kiePMMLExpression.evaluate(processingDTO), dataType);
    }
@Test
    void evaluateFromFieldRef() {
        // <DefineFunction name="CUSTOM_FUNCTION" optype="continuous" dataType="double">
        //     <ParameterField name="PARAM_1"/>
        //     <FieldRef field="PARAM_1"/>
        // </DefineFunction>
        final KiePMMLFieldRef kiePMMLFieldRef = new KiePMMLFieldRef(PARAM_1, Collections.emptyList(), null);
        final KiePMMLDefineFunction defineFunction = new KiePMMLDefineFunction(CUSTOM_FUNCTION, Collections.emptyList(),
                                                                               DATA_TYPE.DOUBLE,
                                                                               OP_TYPE.CONTINUOUS,
                                                                               Collections.singletonList(KiePMMLParameterField.builder(PARAM_1, Collections.emptyList()).build()),
                                                                               kiePMMLFieldRef);
        ProcessingDTO processingDTO = getProcessingDTO(new ArrayList<>());
        Object retrieved = defineFunction.evaluate(processingDTO, Collections.singletonList(value1));
        assertThat(retrieved).isEqualTo(value1);
    }