KiePMMLPredicateFactory { public static KiePMMLCompoundPredicate getKiePMMLCompoundPredicate(CompoundPredicate predicate, DataDictionary dataDictionary) { return KiePMMLCompoundPredicate.builder(Collections.emptyList(), BOOLEAN_OPERATOR.byName(predicate.getBooleanOperator().value())) .withKiePMMLPredicates(getPredicates(predicate.getPredicates(), dataDictionary)) .build(); } 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 getKiePMMLCompoundPredicate() { CompoundPredicate compoundPredicate = new CompoundPredicate(); compoundPredicate.setBooleanOperator(CompoundPredicate.BooleanOperator.XOR); compoundPredicate.getPredicates().addAll(simplePredicates); KiePMMLCompoundPredicate retrieved = KiePMMLPredicateFactory.getKiePMMLCompoundPredicate(compoundPredicate, dataDictionary); assertNotNull(retrieved); assertEquals(BOOLEAN_OPERATOR.XOR, retrieved.getBooleanOperator()); assertEquals(simplePredicates.size(), retrieved.getKiePMMLPredicates().size()); retrieved.getKiePMMLPredicates().forEach(simplePredicate -> commonVerifySimplePredicate((KiePMMLSimplePredicate) simplePredicate, retrieved.getId())); }