public static Map<String, String> getSegmentSourcesMap(final SegmentCompilationDTO segmentCompilationDTO,
                                                           final List<KiePMMLModel> nestedModels) {
        logger.debug(GET_SEGMENT, segmentCompilationDTO.getSegment());
        final KiePMMLModel nestedModel =
                getFromCommonDataAndTransformationDictionaryAndModelWithSources(segmentCompilationDTO)
                        .orElseThrow(() -> new KiePMMLException("Failed to get the KiePMMLModel for segment " + segmentCompilationDTO.getModel().getModelName()));
        final Map<String, String> toReturn = getSegmentSourcesMapCommon(segmentCompilationDTO, nestedModels,
                                                                        nestedModel);
        segmentCompilationDTO.addFields(getFieldsFromModel(segmentCompilationDTO.getModel()));
        return toReturn;
    }
@Test
    void getSegmentSourcesMap() {
        final Segment segment = MINING_MODEL.getSegmentation().getSegments().get(0);
        final List<KiePMMLModel> nestedModels = new ArrayList<>();
        final CommonCompilationDTO<MiningModel> source =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       pmml,
                                                                       MINING_MODEL,
                                                                       new PMMLCompilationContextMock(), "FILENAME");
        final MiningModelCompilationDTO compilationDTO =
                MiningModelCompilationDTO.fromCompilationDTO(source);
        final SegmentCompilationDTO segmentCompilationDTO =
                SegmentCompilationDTO.fromGeneratedPackageNameAndFields(compilationDTO, segment,
                        compilationDTO.getFields());
        final Map<String, String> retrieved = KiePMMLSegmentFactory.getSegmentSourcesMap(segmentCompilationDTO,
                nestedModels);
        commonEvaluateNestedModels(nestedModels);
        commonEvaluateMap(retrieved, segment);
    }