verify(p2).process(any(Message.class));
}
@Test
public void shouldProcessThroughNextProcessorIfFirstFails() throws Exception {
Processor p1 = mock(Processor.class);
when(p1.supports(any(Message.class))).thenReturn(true);
doThrow(new Exception()).when(p1).process(any(Message.class));
Processor p2 = mock(Processor.class);
when(p2.supports(any(Message.class))).thenReturn(true);
Processor p3 = mock(Processor.class);
when(p3.supports(any(Message.class))).thenReturn(true);
RoundRobinProcessor processor = new RoundRobinProcessor()
.addProcessor(p1)
.addProcessor(p2)
.addProcessor(p3);