static BlockStmt getConstantVariableDeclaration(final String variableName, final Constant constant) {
        final MethodDeclaration methodDeclaration =
                CONSTANT_TEMPLATE.getMethodsByName(GETKIEPMMLCONSTANT).get(0).clone();
        final BlockStmt toReturn =
                methodDeclaration.getBody().orElseThrow(() -> new KiePMMLException(String.format(MISSING_BODY_TEMPLATE, methodDeclaration)));
        final VariableDeclarator variableDeclarator =
                getVariableDeclarator(toReturn, CONSTANT).orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_IN_BODY, CONSTANT, toReturn)));
        variableDeclarator.setName(variableName);
        final ObjectCreationExpr objectCreationExpr = variableDeclarator.getInitializer()
                .orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, CONSTANT
                        , toReturn)))
                .asObjectCreationExpr();

        final StringLiteralExpr nameExpr = new StringLiteralExpr(variableName);
        final Expression valueExpr = getExpressionForObject(constant.getValue());
        final Expression dataTypeExpression = getExpressionForDataType(constant.getDataType());

        objectCreationExpr.getArguments().set(0, nameExpr);
        objectCreationExpr.getArguments().set(2, valueExpr);
        objectCreationExpr.getArguments().set(3, dataTypeExpression);
        return toReturn;
    }
@Test
    void getConstantVariableDeclaration() throws IOException {
        String variableName = "variableName";
        Object value = 2342.21;
        Constant constant = new Constant();
        constant.setValue(value);
        BlockStmt retrieved = KiePMMLConstantFactory.getConstantVariableDeclaration(variableName, constant);
        String text = getFileContent(TEST_01_SOURCE);
        Statement expected = JavaParserUtils.parseBlock(String.format(text, variableName, value));
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
        List<Class<?>> imports = Arrays.asList(KiePMMLConstant.class, Collections.class);
        commonValidateCompilationWithImports(retrieved, imports);
    }