static CastExpr getCategoricalPredictorExpression(final String categoricalPredictorMapName) {
        final String lambdaExpressionMethodName = "evaluateCategoricalPredictor";
        final String parameterName = "input";
        final MethodCallExpr lambdaMethodCallExpr = new MethodCallExpr();
        lambdaMethodCallExpr.setName(lambdaExpressionMethodName);
        final NodeList<Expression> arguments = new NodeList<>();
        arguments.add(0, new NameExpr(parameterName));
        arguments.add(1, new NameExpr(categoricalPredictorMapName));
        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);
        lambdaMethodCallExpr.setScope(new NameExpr(KiePMMLRegressionTable.class.getSimpleName()));
        final ClassOrInterfaceType serializableFunctionType =
                getTypedClassOrInterfaceTypeByTypeNames(SerializableFunction.class.getCanonicalName(),
                                                        Arrays.asList(String.class.getSimpleName(),
                                                                      Double.class.getSimpleName()));
        final CastExpr toReturn = new CastExpr();
        toReturn.setType(serializableFunctionType);
        toReturn.setExpression(lambdaExpr);
        return toReturn;
    }
@Test
    void getCategoricalPredictorExpression() throws IOException {
        final String categoricalPredictorMapName = "categoricalPredictorMapName";
        CastExpr retrieved =
                KiePMMLRegressionTableFactory.getCategoricalPredictorExpression(categoricalPredictorMapName);
        String text = getFileContent(TEST_05_SOURCE);
        Expression expected = JavaParserUtils.parseExpression(String.format(text, categoricalPredictorMapName));
        assertThat(retrieved).isEqualTo(expected);
    }