pkgBuilder.addPackageFromDrl( new StringReader( str ) );
assertTrue( "Should not have errors",
pkgBuilder.getErrors().isEmpty() );
// Add once ...
ReteooRuleBase rb = new ReteooRuleBase( "dummy" );
rb.addPackage( pkgBuilder.getPackage() );
// This one works
List list = new ArrayList();
StatefulSession session = rb.newStatefulSession();
session.setGlobal( "list",
list );
session.fireAllRules();
assertEquals( 1,
list.size() );
list.clear();
// ... remove ...
rb.removePackage( pkgBuilder.getPackage().getName() );
rb.addPackage( pkgBuilder.getPackage() );
session = rb.newStatefulSession();
session.setGlobal( "list",
list );
session.fireAllRules();
assertEquals( 1,
list.size() );