public static Map<String, String> getKiePMMLTreeModelSourcesMap(final TreeCompilationDTO compilationDTO) {
        logger.trace("getKiePMMLTreeModelSourcesMap {} {} {}", compilationDTO.getFields(),
                     compilationDTO.getModel(),
                     compilationDTO.getPackageName());
        String className = compilationDTO.getSimpleClassName();
        String packageName = compilationDTO.getPackageName();
        CompilationUnit cloneCU = JavaParserUtils.getKiePMMLModelCompilationUnit(className, packageName,
                                                                                 KIE_PMML_TREE_MODEL_TEMPLATE_JAVA,
                                                                                 KIE_PMML_TREE_MODEL_TEMPLATE);
        ClassOrInterfaceDeclaration modelTemplate = cloneCU.getClassByName(className)
                .orElseThrow(() -> new KiePMMLException(MAIN_CLASS_NOT_FOUND + ": " + className));
        final Double missingValuePenalty = compilationDTO.getMissingValuePenalty();
        final KiePMMLNodeFactory.NodeNamesDTO nodeNamesDTO =
                new KiePMMLNodeFactory.NodeNamesDTO(compilationDTO.getNode(),
                                                                                                 createNodeClassName(), null, missingValuePenalty);
        String fullNodeClassName = packageName + "." + nodeNamesDTO.nodeClassName;
        Map<String, String> toReturn = getKiePMMLNodeSourcesMap(nodeNamesDTO,
                                                                compilationDTO.getFields(),
                                                                packageName);
        setConstructor(compilationDTO,
                       modelTemplate,
                       fullNodeClassName);
        String fullClassName = packageName + "." + className;
        toReturn.put(fullClassName, cloneCU.toString());
        return toReturn;
    }
@Test
    void getKiePMMLTreeModelSourcesMap() {
        CommonCompilationDTO<TreeModel> source = CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                                                        pmml1,
                                                                                                        treeModel1,
                                                                                                        new PMMLCompilationContextMock(),
                                                                                                        SOURCE_1);
        Map<String, String> retrieved =
                KiePMMLTreeModelFactory.getKiePMMLTreeModelSourcesMap(TreeCompilationDTO.fromCompilationDTO(source));
        assertThat(retrieved).isNotNull();
        source = CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                        pmml2,
                                                                        treeModel2,
                                                                        new PMMLCompilationContextMock(),
                                                                        SOURCE_2);
        retrieved =
                KiePMMLTreeModelFactory.getKiePMMLTreeModelSourcesMap(TreeCompilationDTO.fromCompilationDTO(source));
        assertThat(retrieved).isNotNull();
    }