}
@Test
public void testBasicOperation() throws Exception {
KnowledgeBase kbase = loadKnowledgeBase(kconf, "simpleSequential.drl");
StatelessKnowledgeSession ksession = createStatelessKnowledgeSession( kbase );
final List list = new ArrayList();
ksession.setGlobal( "list",
list );
final Person p1 = new Person( "p1",
"stilton" );
final Person p2 = new Person( "p2",
"cheddar" );
final Person p3 = new Person( "p3",
"stilton" );
final Cheese stilton = new Cheese( "stilton",
15 );
final Cheese cheddar = new Cheese( "cheddar",
15 );
ksession.execute( CommandFactory.newInsertElements(Arrays.asList( new Object[]{p1, stilton, p2, cheddar, p3} )) );
assertEquals( 3,
list.size() );
}