RuleUnitComponentFactoryImpl implements RuleUnitComponentFactory { @Override public RuleUnitDescription createRuleUnitDescription( KiePackage pkg, Class<?> ruleUnitClass ) { return new RuleUnitDescriptionImpl( pkg, ruleUnitClass ); }  @Override RuleUnitDescription createRuleUnitDescription( KiePackage pkg, Class<?> ruleUnitClass ); @Override RuleUnitDescription createRuleUnitDescription( KiePackage pkg, String ruleUnitSimpleName ); @Override ApplyPmmlModelCommandExecutor newApplyPmmlModelCommandExecutor(); @Override boolean isRuleUnitClass( Class<?> ruleUnitClass ); @Override boolean isDataSourceClass( Class<?> ruleUnitClass ); @Override boolean isLegacyRuleUnit();  }
@Test public void createRuleUnitDescriptionFromClass() { RuleUnitComponentFactoryImpl r = new RuleUnitComponentFactoryImpl(); KnowledgePackageImpl fooBar = new KnowledgePackageImpl("org.drools.ruleunit"); assertNotNull(r.createRuleUnitDescription(fooBar, org.drools.ruleunit.TestRuleUnit.class)); }
@Test public void createRuleUnitDescriptionFromString() { RuleUnitComponentFactoryImpl r = new RuleUnitComponentFactoryImpl(); KnowledgePackageImpl fooBar = new KnowledgePackageImpl("org.drools.ruleunit"); assertNull(r.createRuleUnitDescription(fooBar, "org.drools.ruleunit.TestRuleUnit.class")); }