// as that class also used JBossRulesRouter as you can see befinal low
@Test
public void nodiscount() throws ObjectMappingException
{
//new messages
Message message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
Order order = new Order();
order.setQuantity(2);
order.setUnitPrice(new BigDecimal("20.0"));
message.getBody().add("Order", order);
// extract the order from the message, so the drl can process it
List<String> messagePathList = new ArrayList<String>();
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(),0.0, 0);
assertEquals("0%",message.getBody().get("DiscountObject"));
String shippingDestination = destinations.iterator().next();
System.out.println(shippingDestination);
assertEquals("normal-shipping-destination", shippingDestination);
} catch (MessageRouterException mre) {