@Test
public void testSimpleTreeOutput() throws Exception {
setKSession( getModelSession( source2, VERBOSE ) );
setKbase( getKSession().getKieBase() );
KieSession kSession = getKSession();
kSession.fireAllRules(); //init model
FactType tgt = kSession.getKieBase().getFactType( packageName, "Fld9" );
FactType tok = kSession.getKieBase().getFactType( PMML4Helper.pmmlDefaultPackageName(), "TreeToken" );
kSession.getEntryPoint( "in_Fld1" ).insert( -1.0 );
kSession.getEntryPoint( "in_Fld2" ).insert( -1.0 );
kSession.getEntryPoint( "in_Fld3" ).insert( "optA" );
kSession.fireAllRules();
Object token = getToken( kSession );
assertEquals( 0.8, tok.get( token, "confidence" ) );
assertEquals( "null", tok.get( token, "current" ) );
assertEquals( 50.0, tok.get( token, "totalCount" ) );
checkFirstDataFieldOfTypeStatus(tgt, true, false, "Missing", "tgtX" );
checkFirstDataFieldOfTypeStatus( kSession.getKieBase().getFactType( packageName, "OutClass" ),
true, false, "Missing", "tgtX" );
checkFirstDataFieldOfTypeStatus( kSession.getKieBase().getFactType( packageName, "OutProb" ),
true, false, "Missing", 0.8 );
}