KiePMMLPredicateFactory { static void setTrueFalsePredicateConstructor(final String generatedClassName, final String predicateName, final ConstructorDeclaration constructorDeclaration) { setConstructorSuperNameInvocation(generatedClassName, constructorDeclaration, predicateName); } 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 setTrueFalsePredicateConstructor() { init(KIE_PMML_TRUE_PREDICATE_TEMPLATE_JAVA, KIE_PMML_TRUE_PREDICATE_TEMPLATE); String generatedClassName = "GENERATEDCLASSNAME"; String predicateName = "PREDICATENAME"; KiePMMLPredicateFactory.setTrueFalsePredicateConstructor(generatedClassName, predicateName, constructorDeclaration); Map<Integer, Expression> superInvocationExpressionsMap = new HashMap<>(); superInvocationExpressionsMap.put(0, new NameExpr(String.format("\"%s\"", predicateName))); Map<String, Expression> assignExpressionMap = new HashMap<>(); assertTrue(commonEvaluateConstructor(constructorDeclaration, generatedClassName, superInvocationExpressionsMap, assignExpressionMap)); }