Collection<KnowledgePackage> kpackages = buildKnowledgePackage( resource,
ResourceType.DRL );
kbase.addKnowledgePackages( kpackages );
StatefulKnowledgeSession ksession = createSession( kbase );
FactType type = kbase.getFactType( "org.drools.test",
"TestEvent" );
Assert.assertNotNull( "could not get type",
type );
ksession = disposeAndReloadSession( ksession,
kbase );
ksession.getEntryPoint( "Test" ).insert( type.newInstance() );
ksession.fireAllRules();
ksession = disposeAndReloadSession( ksession,
kbase );
ksession = disposeAndReloadSession( ksession,