use of org.mule.runtime.core.privileged.exception.AbstractExceptionListener in project mule by mulesoft.
the class ExceptionListenerTestCase method setGoodProcessors.
@Test
public void setGoodProcessors() throws Exception {
List<Processor> list = new ArrayList<Processor>();
list.add(mock(Processor.class));
list.add(mock(Processor.class));
AbstractExceptionListener router = new OnErrorPropagateHandler();
assertNotNull(router.getMessageProcessors());
assertEquals(0, router.getMessageProcessors().size());
router.setMessageProcessors(singletonList(mock(Processor.class)));
assertEquals(1, router.getMessageProcessors().size());
router.setMessageProcessors(list);
assertNotNull(router.getMessageProcessors());
assertEquals(2, router.getMessageProcessors().size());
}
use of org.mule.runtime.core.privileged.exception.AbstractExceptionListener in project mule by mulesoft.
the class ExceptionListenerTestCase method setSingleGoodProcessorEndpoint.
@Test
public void setSingleGoodProcessorEndpoint() throws Exception {
AbstractExceptionListener router = new OnErrorPropagateHandler();
Processor messageProcessor = mock(Processor.class);
router.setMessageProcessors(singletonList(messageProcessor));
assertNotNull(router.getMessageProcessors());
assertTrue(router.getMessageProcessors().contains(messageProcessor));
}
Aggregations