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