@Test
public void addCategoricalPredictors() {

    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();
    ClassOrInterfaceDeclaration tableTemplate = new ClassOrInterfaceDeclaration();
    Map<String, MethodDeclaration> retrieved =
            KiePMMLRegressionTableRegressionFactory.addCategoricalPredictors(categoricalPredictors, tableTemplate);
    assertEquals(3, retrieved.size());
}