static void populateOutputFields(final PMML4Result toUpdate,
                                     final ProcessingDTO processingDTO) {
        logger.debug("populateOutputFields {} {}", toUpdate, processingDTO);
        for (KiePMMLOutputField outputField : processingDTO.getOutputFields()) {
            Object variableValue = outputField.evaluate(processingDTO);
            if (variableValue != null) {
                String variableName = outputField.getName();
                toUpdate.addResultVariable(variableName, variableValue);
                processingDTO.addKiePMMLNameValue(new KiePMMLNameValue(variableName, variableValue));
            }
        }
    }
@Test
    void populateTransformedOutputFieldWithFieldRef() {
        final String mapMissingTo = "mapMissingTo";
        final String variableName = "variableName";
        final Object variableValue = 543.65434;
        KiePMMLFieldRef kiePMMLFieldRef = new KiePMMLFieldRef(variableName, Collections.emptyList(), mapMissingTo);

        KiePMMLOutputField outputField = KiePMMLOutputField.builder(OUTPUT_NAME, Collections.emptyList())
                .withResultFeature(RESULT_FEATURE.TRANSFORMED_VALUE)
                .withKiePMMLExpression(kiePMMLFieldRef)
                .build();
        KiePMMLTestingModel kiePMMLModel = testingModelBuilder(outputField).build();
        ProcessingDTO processingDTO = buildProcessingDTOWithNameValues(kiePMMLModel, new KiePMMLNameValue(variableName, variableValue));
        PMML4Result toUpdate = new PMML4Result();

        PostProcess.populateOutputFields(toUpdate, processingDTO);

        assertThat(toUpdate.getResultVariables()).isNotEmpty();
        assertThat(toUpdate.getResultVariables()).containsKey(OUTPUT_NAME);
        assertThat(toUpdate.getResultVariables().get(OUTPUT_NAME)).isEqualTo(variableValue);
    }