use of com.adaptris.core.services.conditional.conditions.CaseDefault in project interlok by adaptris.
the class SwitchTest method testService_Failure.
@Test
public void testService_Failure() throws Exception {
Switch service = createForTests();
service.getCases().add(new Case().withCondition(new CaseDefault()).withService(new ThrowExceptionService(new ConfiguredException("always-fail"))));
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage();
msg.addMetadata("myKey", "17");
try {
execute(service, msg);
fail();
} catch (ServiceException expected) {
}
}
Aggregations