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