static CastExpr getNumericPredictorExpression(final NumericPredictor numericPredictor) {
        boolean withExponent = !Objects.equals(1, numericPredictor.getExponent());
        final String lambdaExpressionMethodName = withExponent ? "evaluateNumericWithExponent" :
                "evaluateNumericWithoutExponent";
        final String parameterName = "input";
        final MethodCallExpr lambdaMethodCallExpr = new MethodCallExpr();
        lambdaMethodCallExpr.setName(lambdaExpressionMethodName);
        lambdaMethodCallExpr.setScope(new NameExpr(KiePMMLRegressionTable.class.getSimpleName()));
        final NodeList<Expression> arguments = new NodeList<>();
        arguments.add(0, new NameExpr(parameterName));
        arguments.add(1, getExpressionForObject(numericPredictor.getCoefficient().doubleValue()));
        if (withExponent) {
            arguments.add(2, getExpressionForObject(numericPredictor.getExponent().doubleValue()));
        }
        lambdaMethodCallExpr.setArguments(arguments);
        final ExpressionStmt lambdaExpressionStmt = new ExpressionStmt(lambdaMethodCallExpr);
        final LambdaExpr lambdaExpr = new LambdaExpr();
        final Parameter lambdaParameter = new Parameter(new UnknownType(), parameterName);
        lambdaExpr.setParameters(NodeList.nodeList(lambdaParameter));
        lambdaExpr.setBody(lambdaExpressionStmt);
        final String doubleClassName = Double.class.getSimpleName();
        final ClassOrInterfaceType serializableFunctionType =
                getTypedClassOrInterfaceTypeByTypeNames(SerializableFunction.class.getCanonicalName(),
                                                        Arrays.asList(doubleClassName, doubleClassName));
        final CastExpr toReturn = new CastExpr();
        toReturn.setType(serializableFunctionType);
        toReturn.setExpression(lambdaExpr);
        return toReturn;
    }
@Test
    void getNumericPredictorExpressionWithoutExponent() throws IOException {
        String predictorName = "predictorName";
        int exponent = 1;
        double coefficient = 1.23;
        NumericPredictor numericPredictor = PMMLModelTestUtils.getNumericPredictor(predictorName, exponent,
                coefficient);
        CastExpr retrieved = KiePMMLRegressionTableFactory.getNumericPredictorExpression(numericPredictor);
        String text = getFileContent(TEST_02_SOURCE);
        Expression expected = JavaParserUtils.parseExpression(String.format(text, coefficient));
        assertThat(retrieved).isEqualTo(expected);
    }