static void populateJavaParserDTOAndSourcesMap(final JavaParserDTO toPopulate,
                                                   final Map<String, String> sourcesMap,
                                                   final NodeNamesDTO nodeNamesDTO,
                                                   final List<Field<?>> fields,
                                                   final boolean isRoot) {
        // Set 'evaluateNode'
        populateEvaluateNode(toPopulate, nodeNamesDTO, fields, isRoot);
        // Set the nested nodes
        populatedNestedNodes(toPopulate, sourcesMap, fields, nodeNamesDTO);
        // merge generated methods in one class
        // dump generated sources
        sourcesMap.put(toPopulate.fullNodeClassName, toPopulate.getSource());
    }
@Test
    void populateJavaParserDTOAndSourcesMap() {
        boolean isRoot = true;
        Map<String, String> sourcesMap = new HashMap<>();
        KiePMMLNodeFactory.NodeNamesDTO nodeNamesDTO = new KiePMMLNodeFactory.NodeNamesDTO(nodeRoot,
                createNodeClassName(), null,
                1.0);
        KiePMMLNodeFactory.JavaParserDTO toPopulate = new KiePMMLNodeFactory.JavaParserDTO(nodeNamesDTO, PACKAGE_NAME);
        KiePMMLNodeFactory.populateJavaParserDTOAndSourcesMap(toPopulate, sourcesMap, nodeNamesDTO,
                getFieldsFromDataDictionaryAndDerivedFields(dataDictionary2, derivedFields2),
                isRoot);
        commonVerifyEvaluateNode(toPopulate, nodeNamesDTO, isRoot);
    }