static Map<String, KiePMMLTableSourceCategory> getRegressionTablesMap(final RegressionCompilationDTO compilationDTO) {
        Map<String, KiePMMLTableSourceCategory> toReturn;
        if (compilationDTO.isRegression()) {
            final List<RegressionTable> regressionTables =
                    Collections.singletonList(compilationDTO.getModel().getRegressionTables().get(0));
            final RegressionCompilationDTO regressionCompilationDTO =
                    RegressionCompilationDTO.fromCompilationDTORegressionTablesAndNormalizationMethod(compilationDTO,
                                                                                                      regressionTables,
                                                                                                      compilationDTO.getModel().getNormalizationMethod());
            toReturn =
                    KiePMMLRegressionTableFactory.getRegressionTableBuilders(regressionCompilationDTO);
        } else {
            final List<RegressionTable> regressionTables = compilationDTO.getModel().getRegressionTables();
            final RegressionCompilationDTO regressionCompilationDTO =
                    RegressionCompilationDTO.fromCompilationDTORegressionTablesAndNormalizationMethod(compilationDTO,
                                                                                                      regressionTables,
                                                                                                      RegressionModel.NormalizationMethod.NONE);
            toReturn = KiePMMLClassificationTableFactory.getClassificationTableBuilders(regressionCompilationDTO);
        }
        return toReturn;
    }
@Test
    void getRegressionTablesMap() {
        final CompilationDTO<RegressionModel> compilationDTO =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       pmml,
                                                                       regressionModel,
                                                                       new PMMLCompilationContextMock(),
                                                                       "FILENAME");
        Map<String, KiePMMLTableSourceCategory> retrieved = KiePMMLRegressionModelFactory
                .getRegressionTablesMap(RegressionCompilationDTO.fromCompilationDTO(compilationDTO));
        int expectedSize = regressionTables.size() + 1; // One for classification
        assertThat(retrieved).hasSize(expectedSize);
        final Collection<KiePMMLTableSourceCategory> values = retrieved.values();
        regressionTables.forEach(regressionTable ->
                assertThat(values.stream().anyMatch(kiePMMLTableSourceCategory -> kiePMMLTableSourceCategory.getCategory().equals(regressionTable.getTargetCategory()))).isTrue());
    }