@Test
public void testNode() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("org/drools/container/spring/beans.xml");
GridNode node = (GridNode) context.getBean( "node1" );
List<String> list = new ArrayList<String>();
StatelessKieSession kstateless = node.get( "stateless1",
StatelessKieSession.class );
assertNotNull( "can't obtain session named: stateless1",
kstateless );
kstateless.setGlobal( "list",
list );
kstateless.execute( new Person( "Darth",
"Cheddar",
50 ) );
assertEquals( 2,
list.size() );
list = new ArrayList<String>();
KieSession kstateful = node.get( "ksession2",
KieSession.class );
kstateful.setGlobal( "list",
list );
kstateful.insert( new Person( "Darth",
"Cheddar",