private InternalKieModule createKieJarWithClass(KieServices ks, ReleaseId releaseId, int value, int factor) throws IOException {
KieFileSystem kieFileSystem = ks.newKieFileSystem();
KieModuleModel kproj = ks.newKieModuleModel();
KieBaseModel kieBaseModel1 = kproj.newKieBaseModel("KBase1")
.setEqualsBehavior( EqualityBehaviorOption.EQUALITY )
.setEventProcessingMode( EventProcessingOption.STREAM );
KieSessionModel ksession1 = kieBaseModel1.newKieSessionModel("KSession1")
.setType(KieSessionType.STATEFUL)
.setClockType( ClockTypeOption.get("realtime") );
kieFileSystem
.writeKModuleXML(kproj.toXML())
.writePomXML(getPom(releaseId))
.write("src/main/resources/" + kieBaseModel1.getName() + "/rule1.drl", createDRLForJavaSource(value))
.write("src/main/java/org/kie/test/Bean.java", createJavaSource(factor));
KieBuilder kieBuilder = ks.newKieBuilder(kieFileSystem);
assertTrue(kieBuilder.buildAll().getResults().getMessages().isEmpty());
return ( InternalKieModule ) kieBuilder.getKieModule();