KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newByteArrayResource( declarationB.getBytes() ), ResourceType.DRL );
kbuilder.add( ResourceFactory.newByteArrayResource( declarationA.getBytes() ), ResourceType.DRL );
assertFalse( kbuilder.hasErrors() );
kbuilder.batch()
.type( ResourceType.DRL )
.add( ResourceFactory.newByteArrayResource( rule.getBytes() ) )
.build();
assertTrue( kbuilder.hasErrors() );