org.kie.api.runtime.rule.QueryResults results = session.getQueryResults( "assertedobjquery", new String[]{"value1"} );
assertEquals( 1,
results.size() );
assertEquals( new InsertedObject( "value1" ),
((InternalFactHandle) results.iterator().next().getFactHandle( "assertedobj" )).getObject() );
results = session.getQueryResults( "assertedobjquery", new String[]{"value3"} );
assertEquals( 0,
results.size() );
results = session.getQueryResults( "assertedobjquery2", new String[]{null, "value2"} );
assertEquals( 1,
results.size() );
assertEquals( new InsertedObject( "value2" ),
((InternalFactHandle) results.iterator().next().getFactHandle( "assertedobj" )).getObject() );
results = session.getQueryResults( "assertedobjquery2", new String[]{"value3", "value2"} );
assertEquals( 1,
results.size() );
assertEquals( new InsertedObject( "value2" ),
((InternalFactHandle) results.iterator().next().getFactHandle( "assertedobj" )).getObject() );
}