BeanContext beanContext = execContext.getBeanContext();
BeanIdStore beanIdStore = execContext.getContext().getBeanIdStore();
BeanId requiredOrderNumId = beanIdStore.register("requiredOrderNum");
beanContext.addBean(requiredOrderNumId, 9999, null);
try {
smooks.filterSource(execContext, new StringSource("<doc/>"), null);
fail("Expected DataSelectionException");
} catch(SmooksException e) {
assertEquals("Order with ORDERNUMBER=9999 not found in Database", e.getCause().getMessage());