KnowledgeBuilder kb = KnowledgeBuilderFactory.newKnowledgeBuilder();
kb.add( new ByteArrayResource( drl.getBytes() ), ResourceType.DRL );
assertFalse( kb.hasErrors() );
KieBaseConfiguration kbconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
((RuleBaseConfiguration) kbconf).setConflictResolver( SalienceConflictResolver.getInstance() );
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( kbconf );
knowledgeBase.addKnowledgePackages( kb.getKnowledgePackages() );
StatefulKnowledgeSession knowledgeSession = knowledgeBase.newStatefulKnowledgeSession();