@Test void testBeansRegisteredInOrder() { testSubject.setEventHandlers(Arrays.asList(new OrderedBean(), new LateOrderedBean(), new UnorderedBean())); InOrder inOrder = Mockito.inOrder(eventConfigurer); inOrder.verify(eventConfigurer).registerEventHandler(returns(OrderedBean.class)); inOrder.verify(eventConfigurer).registerEventHandler(returns(LateOrderedBean.class)); inOrder.verify(eventConfigurer).registerEventHandler(returns(UnorderedBean.class)); }
public void setEventHandlers(List<Object> beans) { AnnotationAwareOrderComparator.sort(beans); beans.forEach(b -> eventProcessingConfigurer.registerEventHandler(c -> b)); }
EventHandlerRegistrar implements InitializingBean { public void setEventHandlers(List<Object> beans) { AnnotationAwareOrderComparator.sort(beans); beans.forEach(b -> eventProcessingConfigurer.registerEventHandler(c -> b)); } }
EventHandlerRegistrar implements InitializingBean { public void setEventHandlers(List<Object> beans) { AnnotationAwareOrderComparator.sort(beans); beans.forEach(b -> eventProcessingConfigurer.registerEventHandler(c -> b)); } EventHandlerRegistrar(AxonConfiguration axonConfiguration,
                                 ModuleConfiguration eventProcessingConfiguration,
                                 EventProcessingConfigurer eventProcessingConfigurer); }
EventHandlerRegistrar implements InitializingBean { public void setEventHandlers(List<Object> beans) { AnnotationAwareOrderComparator.sort(beans); beans.forEach(b -> eventProcessingConfigurer.registerEventHandler(c -> b)); } EventHandlerRegistrar(AxonConfiguration axonConfiguration,
                                 ModuleConfiguration eventProcessingConfiguration,
                                 EventProcessingConfigurer eventProcessingConfigurer); void setEventHandlers(List<Object> beans); @Override void afterPropertiesSet(); }
EventHandlerRegistrar implements InitializingBean { public void setEventHandlers(List<Object> beans) { AnnotationAwareOrderComparator.sort(beans); beans.forEach(b -> eventProcessingConfigurer.registerEventHandler(c -> b)); } EventHandlerRegistrar(AxonConfiguration axonConfiguration,
                                 ModuleConfiguration eventProcessingConfiguration,
                                 EventProcessingConfigurer eventProcessingConfigurer); void setEventHandlers(List<Object> beans); @Override void afterPropertiesSet();  }