use of org.apache.camel.component.cm.test.mocks.cmsender.UnknownErrorExceptionSender in project camel by apache.
the class CMTest method testUnknownErrorException.
@Test(expected = UnknownErrorException.class)
public void testUnknownErrorException() throws Exception {
// Change sending strategy
CMEndpoint endpoint = (CMEndpoint) camelContext.getEndpoint(applicationContext.getBean(CamelTestConfiguration.class).getUri());
CMProducer producer = endpoint.createProducer();
producer.setSender(new UnknownErrorExceptionSender());
// Body
final SMSMessage smsMessage = new SMSMessage(generateIdAsString(), generateGSM0338Message(), validNumber, null);
send(producer, smsMessage);
}
Aggregations