@Test void testSupportResetWhenAllSupport() { when(mockedEventHandlerInvokerOne.supportsReset()).thenReturn(true); when(mockedEventHandlerInvokerTwo.supportsReset()).thenReturn(true); assertTrue(testSubject.supportsReset()); }
@Override public boolean supportsReset() { return delegates.stream() .anyMatch(EventHandlerInvoker::supportsReset); }
MultiEventHandlerInvoker implements EventHandlerInvoker { @Override public boolean supportsReset() { return delegates.stream() .anyMatch(EventHandlerInvoker::supportsReset); } }
MultiEventHandlerInvoker implements EventHandlerInvoker { @Override public boolean supportsReset() { return delegates.stream() .anyMatch(EventHandlerInvoker::supportsReset); } MultiEventHandlerInvoker(EventHandlerInvoker... delegates);  MultiEventHandlerInvoker(List<EventHandlerInvoker> delegates); }
MultiEventHandlerInvoker implements EventHandlerInvoker { @Override public boolean supportsReset() { return delegates.stream() .anyMatch(EventHandlerInvoker::supportsReset); } MultiEventHandlerInvoker(EventHandlerInvoker... delegates);  MultiEventHandlerInvoker(List<EventHandlerInvoker> delegates); List<EventHandlerInvoker> delegates(); @Override boolean canHandle(EventMessage<?> eventMessage, Segment segment); @Override boolean canHandleType(Class<?> payloadType); @Override void handle(EventMessage<?> message, Segment segment); @Override boolean supportsReset(); @Override void performReset(); @Override void performReset(R resetContext); }
MultiEventHandlerInvoker implements EventHandlerInvoker { @Override public boolean supportsReset() { return delegates.stream() .anyMatch(EventHandlerInvoker::supportsReset); } MultiEventHandlerInvoker(EventHandlerInvoker... delegates);  MultiEventHandlerInvoker(List<EventHandlerInvoker> delegates); List<EventHandlerInvoker> delegates(); @Override boolean canHandle(EventMessage<?> eventMessage, Segment segment); @Override boolean canHandleType(Class<?> payloadType); @Override void handle(EventMessage<?> message, Segment segment); @Override boolean supportsReset(); @Override void performReset(); @Override void performReset(R resetContext);  }