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