rule += "then\n";
rule += " System.out.println(\"buddy inserted\")";
rule += "end\n";
kbuilder.add( new ByteArrayResource( rule.getBytes() ),
ResourceType.DRL );
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if ( errors != null && errors.size() > 0 ) {
for ( KnowledgeBuilderError error : errors ) {
logger.warn( "Error: " + error.getMessage() );
}
Assert.fail( "KnowledgeBase did not build" );
}