public static KiePMMLFieldOperatorValue getConstraintEntryFromSimplePredicates(final String fieldName,
                                                                                   final BOOLEAN_OPERATOR containerOperator,
                                                                                   final List<SimplePredicate> simplePredicates,
                                                                                   final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap) {
        List<KiePMMLOperatorValue> kiePMMLOperatorValues = simplePredicates
                .stream()
                .map(simplePredicate -> new KiePMMLOperatorValue(OPERATOR.byName(simplePredicate.getOperator().value()),
                                                                 getCorrectlyFormattedObject(simplePredicate, fieldTypeMap)))
                .collect(Collectors.toList());
        return new KiePMMLFieldOperatorValue(fieldName, containerOperator, kiePMMLOperatorValues, null);
    }
@Test
    void getConstraintEntryFromSimplePredicates() {
        final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = new HashMap<>();
        String fieldName = "FIELD_NAME";
        List<SimplePredicate> simplePredicates = IntStream.range(0, 2)
                .mapToObj(index -> {
                    fieldTypeMap.put(fieldName,
                            new KiePMMLOriginalTypeGeneratedType(DataType.STRING.value(),
                                    getSanitizedClassName(fieldName.toUpperCase())));
                    return PMMLModelTestUtils
                            .getSimplePredicate(fieldName, "VALUE-" + index, SimplePredicate.Operator.LESS_THAN);
                })
                .collect(Collectors.toList());
        final KiePMMLFieldOperatorValue retrieved = KiePMMLASTFactoryUtils
                .getConstraintEntryFromSimplePredicates(fieldName, BOOLEAN_OPERATOR.OR, simplePredicates, fieldTypeMap);
        assertThat(retrieved.getName()).isEqualTo(fieldName);
        assertThat(retrieved.getConstraintsAsString()).isNotNull();
        String expected = "value < \"VALUE-0\" || value < \"VALUE-1\"";
        assertThat(retrieved.getConstraintsAsString()).isEqualTo(expected);
    }