static BlockStmt getMapValuesVariableDeclaration(final String variableName, final MapValues mapValues) {
        if (mapValues.getInlineTable() == null && mapValues.getTableLocator() != null) {
            throw new UnsupportedOperationException("TableLocator not supported, yet");
        }
        final MethodDeclaration methodDeclaration =
                MAPVALUES_TEMPLATE.getMethodsByName(GETKIEPMMLMAPVALUES).get(0).clone();
        final BlockStmt mapValuesBody =
                methodDeclaration.getBody().orElseThrow(() -> new KiePMMLException(String.format(MISSING_BODY_TEMPLATE, methodDeclaration)));
        final VariableDeclarator variableDeclarator =
                getVariableDeclarator(mapValuesBody, MAPVALUES).orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_IN_BODY, MAPVALUES, mapValuesBody)));
        variableDeclarator.setName(variableName);
        final BlockStmt toReturn = new BlockStmt();
        int counter = 0;
        final NodeList<Expression> arguments = new NodeList<>();
        if (mapValues.hasFieldColumnPairs()) {
            for (FieldColumnPair fieldColumnPair : mapValues.getFieldColumnPairs()) {
                String nestedVariableName = String.format(VARIABLE_NAME_TEMPLATE, variableName, counter);
                arguments.add(new NameExpr(nestedVariableName));
                BlockStmt toAdd = getFieldColumnPairVariableDeclaration(nestedVariableName, fieldColumnPair);
                toAdd.getStatements().forEach(toReturn::addStatement);
                counter++;
            }
        }
        String inlineTableVariableName = String.format("%s_InlineTable", variableName);
        BlockStmt toAdd = getInlineTableVariableDeclaration(inlineTableVariableName, mapValues.getInlineTable());
        toAdd.getStatements().forEach(toReturn::addStatement);
        final MethodCallExpr initializer = variableDeclarator.getInitializer()
                .orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE,
                MAPVALUES, toReturn)))
                .asMethodCallExpr();
        final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
        final StringLiteralExpr nameExpr = new StringLiteralExpr(variableName);
        final StringLiteralExpr outputColumnExpr = new StringLiteralExpr(mapValues.getOutputColumn());
        builder.setArgument(0, nameExpr);
        builder.setArgument(2, outputColumnExpr);
        final Expression dataTypeExpression = getExpressionForDataType(mapValues.getDataType());
        getChainedMethodCallExprFrom("withDefaultValue", initializer).setArgument(0, getExpressionForObject
        (mapValues.getDefaultValue()));
        getChainedMethodCallExprFrom("withMapMissingTo", initializer).setArgument(0, getExpressionForObject
                (mapValues.getMapMissingTo()));
        getChainedMethodCallExprFrom("withDataType", initializer).setArgument(0, dataTypeExpression);
        getChainedMethodCallExprFrom("withKiePMMLInlineTable", initializer).setArgument(0,
        new NameExpr(inlineTableVariableName));
        getChainedMethodCallExprFrom("asList", initializer).setArguments(arguments);
        mapValuesBody.getStatements().forEach(toReturn::addStatement);
        return toReturn;
    }
@Test
    void getMapValuesVariableDeclaration() throws IOException {
        String variableName = "variableName";
        BlockStmt retrieved = KiePMMLMapValuesFactory.getMapValuesVariableDeclaration(variableName,
                                                                                      MAPVALUES);
        String text = getFileContent(TEST_01_SOURCE);
        Statement expected = JavaParserUtils.parseBlock(String.format(text, variableName));
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
        List<Class<?>> imports = Arrays.asList(Arrays.class, Collections.class, Collectors.class,
                                               KiePMMLFieldColumnPair.class, KiePMMLInlineTable.class,
                                               KiePMMLMapValues.class, KiePMMLRow.class, Map.class, Stream.class);
        commonValidateCompilationWithImports(retrieved, imports);
    }