@Test
public void testConfiguration() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/drools/container/spring/session-conf-beans.xml" );
KnowledgeBaseImpl kbase1 = (KnowledgeBaseImpl) context.getBean( "kbase1" );
RuleBaseConfiguration rconf = ((InternalRuleBase) kbase1.getRuleBase()).getConfiguration();
assertTrue( rconf.isAdvancedProcessRuleIntegration() );
assertTrue( rconf.isMultithreadEvaluation() );
assertEquals( 5,
rconf.getMaxThreads() );
assertEquals( EventProcessingOption.STREAM,
rconf.getEventProcessingMode() );
assertEquals( AssertBehaviour.IDENTITY,
rconf.getAssertBehaviour() );
assertEquals( "org.drools.container.spring.MockConsequenceExceptionHandler",
rconf.getConsequenceExceptionHandler() );
KnowledgeBaseImpl kbase2 = (KnowledgeBaseImpl) context.getBean( "kbase2" );
rconf = ((InternalRuleBase) kbase2.getRuleBase()).getConfiguration();
assertFalse( rconf.isAdvancedProcessRuleIntegration() );
assertFalse( rconf.isMultithreadEvaluation() );
assertEquals( 3,
rconf.getMaxThreads() );
assertEquals( EventProcessingOption.CLOUD,
rconf.getEventProcessingMode() );
assertEquals( AssertBehaviour.EQUALITY,
rconf.getAssertBehaviour() );
StatefulKnowledgeSessionImpl ksession1 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession1" );
SessionConfiguration sconf = ksession1.session.getSessionConfiguration();
assertTrue( sconf.isKeepReference() );
assertEquals( ClockType.REALTIME_CLOCK,