kSession.getEntryPoint( "in_ResidenceState" ).insert( "KN" );
kSession.getEntryPoint( "in_ValidLicense" ).insert( true );
kSession.fireAllRules(); //init model
FactType scoreCardType = getKbase().getFactType( PMML4Helper.pmmlDefaultPackageName(), "ScoreCard" );
assertNotNull( scoreCardType );
assertEquals( 1, kSession.getObjects( new ClassObjectFilter( scoreCardType.getFactClass() ) ).size() );
Object scoreCard = kSession.getObjects( new ClassObjectFilter( scoreCardType.getFactClass() ) ).iterator().next();
System.out.print( reportWMObjects( kSession )
);
assertEquals( "SampleScore", scoreCardType.get( scoreCard, "modelName" ) );
assertEquals( 41.345, scoreCardType.get( scoreCard, "score" ) );
Object x = scoreCardType.get( scoreCard, "ranking" );
assertTrue( x instanceof LinkedHashMap );
LinkedHashMap map = (LinkedHashMap) x;
assertTrue( map.containsKey( "LX00") );
assertTrue( map.containsKey( "RES") );
assertTrue( map.containsKey( "CX2" ) );