static BlockStmt getSimplePredicateVariableDeclaration(final String variableName,
                                                           final SimplePredicate simplePredicate,
                                                           final List<Field<?>> fields) {
        final MethodDeclaration methodDeclaration =
                SIMPLE_PREDICATE_TEMPLATE.getMethodsByName(GETKIEPMMLSIMPLEPREDICATE).get(0).clone();
        final BlockStmt simplePredicateBody =
                methodDeclaration.getBody().orElseThrow(() -> new KiePMMLException(String.format(MISSING_BODY_TEMPLATE, methodDeclaration)));
        final VariableDeclarator variableDeclarator =
                getVariableDeclarator(simplePredicateBody, SIMPLE_PREDICATE).orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_IN_BODY, SIMPLE_PREDICATE, simplePredicateBody)));
        variableDeclarator.setName(variableName);
        final BlockStmt toReturn = new BlockStmt();
        final OPERATOR operator = OPERATOR.byName(simplePredicate.getOperator().value());
        final NameExpr operatorExpr = new NameExpr(OPERATOR.class.getName() + "." + operator.name());
        final MethodCallExpr initializer = variableDeclarator.getInitializer()
                .orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, SIMPLE_PREDICATE, simplePredicateBody)))
                .asMethodCallExpr();
        final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
        builder.setArgument(0, new StringLiteralExpr(simplePredicate.getField()));
        builder.setArgument(2, operatorExpr);
        DataType dataType = getDataType(fields,simplePredicate.getField());
        Object actualValue = DATA_TYPE.byName(dataType.value()).getActualValue(simplePredicate.getValue());
        getChainedMethodCallExprFrom("withValue", initializer).setArgument(0, getExpressionForObject(actualValue));
        simplePredicateBody.getStatements().forEach(toReturn::addStatement);
        return toReturn;
    }
@Test
    void getSimplePredicateVariableDeclaration() throws IOException {
        String variableName = "variableName";
        final SimplePredicate simplePredicate = new SimplePredicate();
        simplePredicate.setField("CUSTOM_FIELD");
        simplePredicate.setValue("235.435");
        simplePredicate.setOperator(SimplePredicate.Operator.EQUAL);
        String operatorString = OPERATOR.class.getName() + "." + OPERATOR.byName(simplePredicate.getOperator().value());
        DataField dataField = new DataField();
        dataField.setName(simplePredicate.getField());
        dataField.setDataType(DataType.DOUBLE);
        DataDictionary dataDictionary = new DataDictionary();
        dataDictionary.addDataFields(dataField);

        BlockStmt retrieved = KiePMMLSimplePredicateFactory.getSimplePredicateVariableDeclaration(variableName, simplePredicate, getFieldsFromDataDictionary(dataDictionary));
        String text = getFileContent(TEST_01_SOURCE);
        Statement expected = JavaParserUtils.parseBlock(String.format(text, variableName,simplePredicate.getField(),
                                                                      operatorString,
                                                                      simplePredicate.getValue()));
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
        List<Class<?>> imports = Arrays.asList(KiePMMLSimplePredicate.class, Collections.class);
        commonValidateCompilationWithImports(retrieved, imports);
    }