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