Search in sources :

Example 1 with PDUStringException

use of org.jsmpp.PDUStringException in project camel by apache.

the class MessageReceiverListenerImplTest method setUp.

@Before
public void setUp() {
    endpoint = createMock(SmppEndpoint.class);
    processor = createMock(Processor.class);
    exceptionHandler = createMock(ExceptionHandler.class);
    listener = new MessageReceiverListenerImpl(endpoint, processor, exceptionHandler);
    listener.setMessageIDGenerator(new MessageIDGenerator() {

        public MessageId newMessageId() {
            try {
                return new MessageId("1");
            } catch (PDUStringException e) {
                throw new RuntimeException(e);
            }
        }
    });
}
Also used : ExceptionHandler(org.apache.camel.spi.ExceptionHandler) Processor(org.apache.camel.Processor) MessageIDGenerator(org.jsmpp.util.MessageIDGenerator) PDUStringException(org.jsmpp.PDUStringException) MessageId(org.jsmpp.util.MessageId) Before(org.junit.Before)

Aggregations

Processor (org.apache.camel.Processor)1 ExceptionHandler (org.apache.camel.spi.ExceptionHandler)1 PDUStringException (org.jsmpp.PDUStringException)1 MessageIDGenerator (org.jsmpp.util.MessageIDGenerator)1 MessageId (org.jsmpp.util.MessageId)1 Before (org.junit.Before)1