KiePMMLRegressionTableRegressionFactory { static Map<String, MethodDeclaration> addNumericPredictors(final List<NumericPredictor> numericPredictors , final ClassOrInterfaceDeclaration tableTemplate) { predictorsArity.set(0); return numericPredictors.stream() .map(numericPredictor -> new AbstractMap.SimpleEntry<>(numericPredictor.getName().getValue(), addNumericPredictor(numericPredictor, tableTemplate, predictorsArity.addAndGet(1)))) .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); } private  KiePMMLRegressionTableRegressionFactory(); static LinkedHashMap<String, KiePMMLTableSourceCategory> getRegressionTables(final List<RegressionTable> regressionTables,
                                                                                        final RegressionModel.NormalizationMethod normalizationMethod,
                                                                                        final List<KiePMMLOutputField> outputFields,
                                                                                        final String targetField,
                                                                                        final String packageName); static Map.Entry<String, String> getRegressionTable(final RegressionTable regressionTable,
                                                               final RegressionModel.NormalizationMethod normalizationMethod,
                                                               final List<KiePMMLOutputField> outputFields,
                                                               final String targetField,
                                                               final String packageName); static final String KIE_PMML_REGRESSION_TABLE_REGRESSION_TEMPLATE_JAVA; static final String KIE_PMML_REGRESSION_TABLE_REGRESSION_TEMPLATE; }
@Test public void addNumericPredictors() { final List<NumericPredictor> numericPredictors = IntStream.range(0, 3).mapToObj(index -> { String predictorName = "predictorName-" + index; double coefficient = 1.23 * index; return PMMLModelTestUtils.getNumericPredictor(predictorName, index, coefficient); }).collect(Collectors.toList()); ClassOrInterfaceDeclaration tableTemplate = new ClassOrInterfaceDeclaration(); Map<String, MethodDeclaration> retrieved = KiePMMLRegressionTableRegressionFactory.addNumericPredictors(numericPredictors, tableTemplate); assertEquals(numericPredictors.size(), retrieved.size()); }