static Map<String, Expression> getPredictorTermFunctions(final List<PredictorTerm> predictorTerms) {
        predictorsArity.set(0);
        return predictorTerms.stream()
                .map(predictorTerm -> {
                    int arity = predictorsArity.addAndGet(1);
                    String variableName = predictorTerm.getName() != null ?predictorTerm.getName() :
                            "predictorTermFunction" + arity;
                    return new AbstractMap.SimpleEntry<>(variableName,
                                                         getPredictorTermFunction(predictorTerm));
                })
                .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey,
                                          AbstractMap.SimpleEntry::getValue));
    }
@Test
    void getPredictorTermFunctions() {
        final List<PredictorTerm> predictorTerms = IntStream.range(0, 3).mapToObj(index -> {
            String predictorName = "predictorName-" + index;
            double coefficient = 1.23 * index;
            String fieldRef = "fieldRef-" + index;
            return PMMLModelTestUtils.getPredictorTerm(predictorName, coefficient,
                    Collections.singletonList(fieldRef));
        }).collect(Collectors.toList());
        Map<String, Expression> retrieved =
                KiePMMLRegressionTableFactory.getPredictorTermFunctions(predictorTerms);
        assertThat(retrieved).hasSameSizeAs(predictorTerms);
        IntStream.range(0, predictorTerms.size()).forEach(index -> {
            PredictorTerm predictorTerm = predictorTerms.get(index);
            assertThat(retrieved).containsKey(predictorTerm.getName());
        });
    }