static LambdaExpr getPredictorTermFunction(final PredictorTerm predictorTerm) {
        try {
            LambdaExpr toReturn = new LambdaExpr();
            toReturn.setParameters(NodeList.nodeList(new Parameter(new UnknownType(), "resultMap")));
            final BlockStmt body = getPredictorTermBody(predictorTerm);
            toReturn.setBody(body);

            return toReturn;
        } catch (Exception e) {
            throw new KiePMMLInternalException(String.format("Failed to get PredictorTermFunction for %s",
                                                             predictorTerm), e);
        }
    }
@Test
    void getPredictorTermFunction() throws IOException {
        String predictorName = "predictorName";
        double coefficient = 23.12;
        String fieldRef = "fieldRef";
        PredictorTerm predictorTerm = PMMLModelTestUtils.getPredictorTerm(predictorName, coefficient,
                Collections.singletonList(fieldRef));
        LambdaExpr retrieved = KiePMMLRegressionTableFactory.getPredictorTermFunction(predictorTerm);

        String text = getFileContent(TEST_07_SOURCE);
        Expression expected = JavaParserUtils.parseExpression(String.format(text, fieldRef, coefficient));
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
    }