public void testNullValuesIndexing() throws Exception {
KnowledgeBase kbase = SerializationHelper.serializeObject( loadKnowledgeBase( "test_NullValuesIndexing.drl" ) );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
// Adding person with null name and likes attributes
final PersonInterface bob = new Person( null,
null );
bob.setStatus( "P1" );
final PersonInterface pete = new Person( null,
null );
bob.setStatus( "P2" );
ksession.insert( bob );
ksession.insert( pete );
ksession.fireAllRules();
assertEquals( "Indexing with null values is not working correctly.",
"OK",
bob.getStatus() );
assertEquals( "Indexing with null values is not working correctly.",
"OK",
pete.getStatus() );
}