@Override
    public Map<String, String> getSourcesMap(final CompilationDTO<TreeModel> compilationDTO) {
        logger.trace("getKiePMMLModelWithSources {} {} {} {}", compilationDTO.getPackageName(),
                     compilationDTO.getFields(),
                     compilationDTO.getModel(),
                     compilationDTO.getPmmlContext());
        try {
            return KiePMMLTreeModelFactory.getKiePMMLTreeModelSourcesMap(TreeCompilationDTO.fromCompilationDTO(compilationDTO));
        } catch (Exception e) {
            throw new KiePMMLException(e);
        }
    }
@Test
    void getKiePMMLModelWithSources() {
        TreeModel treeModel = (TreeModel) pmml.getModels().get(0);
        final CommonCompilationDTO<TreeModel> compilationDTO =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       pmml,
                                                                       treeModel,
                                                                       new PMMLCompilationContextMock(), SOURCE_1);
        final KiePMMLModelWithSources retrieved = PROVIDER.getKiePMMLModelWithSources(compilationDTO);
        assertThat(retrieved).isNotNull();
        final Map<String, String> sourcesMap = retrieved.getSourcesMap();
        assertThat(sourcesMap).isNotNull();
        assertThat(sourcesMap).isNotEmpty();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        try {
            final Map<String, Class<?>> compiled = KieMemoryCompiler.compile(sourcesMap, classLoader);
            for (Class<?> clazz : compiled.values()) {
                assertThat(clazz).isInstanceOf(Serializable.class);
            }
        } catch (Throwable t) {
            fail(t.getMessage());
        }
    }