messagePathList.add("body.Order");
ObjectMapper mapper = new ObjectMapper();
List<Object> objectList = mapper.createObjectList(message, messagePathList);
//Now send to the rules engine
JBossRulesRouter jbossRulesRouter = new JBossRulesRouter();
ConfigTree configTree = new CBRConfigTreeBuilder( true ).ruleFile( "JBossESBPricingRoutingRules.drl").build();
jbossRulesRouter.setConfigTree( configTree );
try {
List<String> destinations = jbossRulesRouter.route("JBossESBPricingRoutingRules.drl", false, message, objectList);
assertEquals(order.getDiscount(),10.0, 0);
assertEquals("10%",message.getBody().get("DiscountObject"));