static KiePMMLPredicate getKiePMMLPredicate(final Predicate predicate,
                                                final List<Field<?>> fields) {
        if (predicate instanceof SimplePredicate) {
            return getKiePMMLSimplePredicate((SimplePredicate) predicate, fields);
        } else if (predicate instanceof SimpleSetPredicate) {
            return getKiePMMLSimpleSetPredicate((SimpleSetPredicate) predicate);
        } else if (predicate instanceof CompoundPredicate) {
            return getKiePMMLCompoundPredicate((CompoundPredicate) predicate, fields);
        } else if (predicate instanceof True) {
            return getKiePMMLTruePredicate((True) predicate);
        } else if (predicate instanceof False) {
            return getKiePMMLFalsePredicate((False) predicate);
        } else {
            throw new IllegalArgumentException(String.format(PREDICATE_NOT_MANAGED, predicate.getClass()));
        }
    }
@Test
    void getKiePMMLPredicate() {
        List<Field<?>> fields = IntStream.range(0, 3).mapToObj(i -> getRandomDataField()).collect(Collectors.toList());
        SimplePredicate simplePredicate1 = getRandomSimplePredicate((DataField) fields.get(0));
        KiePMMLPredicate retrieved = KiePMMLPredicateInstanceFactory.getKiePMMLPredicate(simplePredicate1, fields);
        commonVerifyKiePMMLPredicate(retrieved, simplePredicate1);

        SimpleSetPredicate simpleSetPredicate = getRandomSimpleSetPredicate((DataField) fields.get(2));
        retrieved = KiePMMLPredicateInstanceFactory.getKiePMMLPredicate(simpleSetPredicate, fields);
        commonVerifyKiePMMLPredicate(retrieved, simpleSetPredicate);

        final CompoundPredicate compoundPredicate = getRandomCompoundPredicate(fields);
        retrieved = KiePMMLPredicateInstanceFactory.getKiePMMLPredicate(compoundPredicate, fields);
        commonVerifyKiePMMLPredicate(retrieved, compoundPredicate);

        False falsePredicate = new False();
        retrieved = KiePMMLPredicateInstanceFactory.getKiePMMLPredicate(falsePredicate, fields);
        commonVerifyKiePMMLPredicate(retrieved, falsePredicate);

        True truePredicate = new True();
        retrieved = KiePMMLPredicateInstanceFactory.getKiePMMLPredicate(truePredicate, fields);
        commonVerifyKiePMMLPredicate(retrieved, truePredicate);
    }