System.setProperty(Environment.DEFAULT_INVM_SCOPE, "NONE");
MockAction.exception = null;
}
public void test_async() throws Exception {
AbstractTestRunner testRunner = new AbstractTestRunner() {
public void test() throws Exception {
ServiceInvoker invoker = new ServiceInvoker("ServiceCat", "CallService");
Message message = MessageFactory.getInstance().getMessage();
ActionProcessingException exception = new ActionProcessingException("Exception!!!");
message.getHeader().getCall().setFrom(new LogicalEPR("A", "B"));
Message faultMessage = Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, exception);
// Should not get a MessageDeliverException...
invoker.deliverAsync(faultMessage);
// Mock action should have received faultMessage...
waitForMockSet(faultMessage);
assertTrue("Message equality", checkMessageEquality(faultMessage, MockAction.message));
}
}.setServiceConfig("JBESB-2227-config-01.xml");
testRunner.run();
}