messagePathList.add("body.Order");
messagePathList.add("body.Counter");
// process message
List<Object> objectList = new ObjectMapper().createObjectList(message, messagePathList);
RuleInfo ruleInfo = new RuleInfoBuilder("JBossESBPricingRulesStateful.drl").reload(true).globals(globals).defaultFacts(objectList).build();
StatefulRuleInfoImpl statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, true);
message = ruleService.executeStatefulRules( statefulRuleInfo, message );
assertEquals( 20.0, order.getDiscount(), 0 );
assertEquals( "20%" ,message.getBody().get("DiscountObject"));