static Map<String, String> getKiePMMLCharacteristicsSourcesMap(
            final ScorecardCompilationDTO compilationDTO) {

        final String characteristicsClassName = compilationDTO.getCharacteristicsClassName();
        final Characteristics characteristics = compilationDTO.getCharacteristics();
        final List<Field<?>> fields = compilationDTO.getFields();
        final String packageName = compilationDTO.getPackageName();
        CompilationUnit cloneCU = JavaParserUtils.getKiePMMLModelCompilationUnit(characteristicsClassName,
                                                                                 packageName,
                                                                                 KIE_PMML_CHARACTERISTICS_TEMPLATE_JAVA, KIE_PMML_CHARACTERISTICS_TEMPLATE);
        final ClassOrInterfaceDeclaration characteristicsTemplate =
                cloneCU.getClassByName(characteristicsClassName)
                        .orElseThrow(() -> new KiePMMLException(MAIN_CLASS_NOT_FOUND + ": " + KIE_PMML_CHARACTERISTICS_TEMPLATE));
        setCharacteristicsVariableDeclaration(characteristicsClassName, characteristics, fields,
                                              characteristicsTemplate);
        Map<String, String> toReturn = new HashMap<>();
        String fullClassName = packageName + "." + characteristicsClassName;
        toReturn.put(fullClassName, cloneCU.toString());
        return toReturn;
    }
@Test
    void getKiePMMLCharacteristicsSourcesMap() {
        final CommonCompilationDTO<Scorecard> source =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       basicComplexPartialScorePmml,
                                                                       basicComplexPartialScore,
                                                                       new PMMLCompilationContextMock(),
                                                                       BASIC_COMPLEX_PARTIAL_SCORE_SOURCE);
        ScorecardCompilationDTO compilationDTO = ScorecardCompilationDTO.fromCompilationDTO(source);
        final Map<String, String> retrieved =
                KiePMMLCharacteristicsFactory.getKiePMMLCharacteristicsSourcesMap(compilationDTO);
        assertThat(retrieved).isNotNull();
        assertThat(retrieved).hasSize(1);
        String expected = compilationDTO.getPackageCanonicalCharacteristicsClassName();
        assertThat(retrieved).containsKey(expected);
        try {
            KieMemoryCompiler.compile(retrieved, Thread.currentThread().getContextClassLoader());
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }