.newKieSessionModel( KSESSION_NAME )
.setDefault( true );
kfs.writeKModuleXML( kmoduleModel.toXML() );
KieBuilder builder = ks.newKieBuilder( kfs ).buildAll();
for ( org.kie.api.builder.Message m : builder.getResults().getMessages() ) {
System.out.println( m );
}
assertEquals( 0, builder.getResults().getMessages().size() );
ks.getRepository().addKieModule( builder.getKieModule() );
KieSession kieSession = ks.newKieContainer( ks.getRepository().getDefaultReleaseId() ).newKieSession( KSESSION_NAME );
assertNotNull( kieSession );
KieBase kieBase = ks.newKieContainer( ks.getRepository().getDefaultReleaseId() ).getKieBase( KBASE_NAME );