KiePMMLPredicateFactory { public static List<KiePMMLPredicate> getPredicates(List<Predicate> predicates, DataDictionary dataDictionary) { logger.trace("getPredicates {}", predicates); return predicates.stream().map(predicate -> getPredicate(predicate, dataDictionary)).collect(Collectors.toList()); } private  KiePMMLPredicateFactory(); static List<KiePMMLPredicate> getPredicates(List<Predicate> predicates, DataDictionary dataDictionary); static KiePMMLPredicate getPredicate(Predicate predicate, DataDictionary dataDictionary); static KiePMMLSimplePredicate getKiePMMLSimplePredicate(SimplePredicate predicate, DataType dataType); static KiePMMLSimpleSetPredicate getKiePMMLSimpleSetPredicate(SimpleSetPredicate predicate); static KiePMMLCompoundPredicate getKiePMMLCompoundPredicate(CompoundPredicate predicate,
                                                                       DataDictionary dataDictionary); static KiePMMLTruePredicate getKiePMMLTruePredicate(); static KiePMMLFalsePredicate getKiePMMLFalsePredicate(); static Map<String, String> getPredicateSourcesMap(final KiePMMLPredicate kiePMMLPredicate,
                                                             final String packageName);  }
@Test public void getPredicates() { List<Predicate> predicates = new ArrayList<>(simplePredicates); CompoundPredicate compoundPredicate = new CompoundPredicate(); compoundPredicate.setBooleanOperator(CompoundPredicate.BooleanOperator.XOR); compoundPredicate.getPredicates().addAll(simplePredicates); predicates.add(compoundPredicate); True truePredicate = new True(); predicates.add(truePredicate); False falsePredicate = new False(); predicates.add(falsePredicate); List<KiePMMLPredicate> retrieved = KiePMMLPredicateFactory .getPredicates(predicates, dataDictionary); assertEquals(predicates.size(), retrieved.size()); }