static Map<String, Expression> getCategoricalPredictorsExpressions(final List<CategoricalPredictor> categoricalPredictors, final BlockStmt body, final String variableName) {
        final Map<String, List<CategoricalPredictor>> groupedCollectors = categoricalPredictors.stream()
                .collect(groupingBy(categoricalPredictor ->categoricalPredictor.getField()));
        final String categoricalPredictorMapNameBase = getSanitizedVariableName(String.format("%sMap", variableName));
        final AtomicInteger counter = new AtomicInteger();
        return groupedCollectors.entrySet().stream()
                .map(entry -> {
                    final String categoricalPredictorMapName = String.format(VARIABLE_NAME_TEMPLATE,
                                                                             categoricalPredictorMapNameBase,
                                                                             counter.getAndIncrement());
                    populateWithGroupedCategoricalPredictorMap(entry.getValue(), body, categoricalPredictorMapName);
                    return new AbstractMap.SimpleEntry<>(entry.getKey(),
                                                         getCategoricalPredictorExpression(categoricalPredictorMapName));
                })
                .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey,
                                          AbstractMap.SimpleEntry::getValue));
    }
@Test
    void getCategoricalPredictorsExpressions() {
        final List<CategoricalPredictor> categoricalPredictors = IntStream.range(0, 3).mapToObj(index ->
                IntStream.range(0,
                        3).mapToObj(i -> {
                    String predictorName = "predictorName-" + index;
                    double coefficient = 1.23 * i;
                    return PMMLModelTestUtils.getCategoricalPredictor(predictorName, i, coefficient);
                })
                        .collect(Collectors.toList())).reduce((categoricalPredictors1, categoricalPredictors2) -> {
            List<CategoricalPredictor> toReturn = new ArrayList<>();
            toReturn.addAll(categoricalPredictors1);
            toReturn.addAll(categoricalPredictors2);
            return toReturn;
        }).get();
        final BlockStmt body = new BlockStmt();
        Map<String, Expression> retrieved =
                KiePMMLRegressionTableFactory.getCategoricalPredictorsExpressions(categoricalPredictors,
                        body,
                        "variableName");
        assertThat(retrieved).hasSize(3);
        final Map<String, List<CategoricalPredictor>> groupedCollectors = categoricalPredictors.stream()
                .collect(groupingBy(categoricalPredictor ->categoricalPredictor.getField()));

        groupedCollectors.values().forEach(categoricalPredictors12 -> commonEvaluateCategoryPredictors(body,
                categoricalPredictors12, "variableName"));
    }