// Testing 2.
System.out.println("Start testing 2.");
StatelessKnowledgeSession session2 = session1.getKieBase().newStatelessKnowledgeSession();
session2.setGlobal("myGlobal", "Testing 2");
session2.execute(sample);
Map.Entry[] entries2 = ((MapGlobalResolver) session2.getGlobals()).getGlobals();
assertEquals(1, entries2.length);
assertEquals( entries2[0].getValue(), "Testing 2" );
assertEquals( 1, session2.getGlobals().getGlobalKeys().size() );
assertTrue( session2.getGlobals().getGlobalKeys().contains("myGlobal") );