EventBusBeanFactoryPostProcessor implements BeanFactoryPostProcessor { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { EventBusBeanPostProcessor eventBusBeanPostProcessor = new EventBusBeanPostProcessor(beanFactory); beanFactory.addBeanPostProcessor(eventBusBeanPostProcessor); }  @Override void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory);  }
@Test public void postProcessBeanFactory() { EventBusBeanFactoryPostProcessor beanFactoryPostProcessor = new EventBusBeanFactoryPostProcessor(); beanFactoryPostProcessor.postProcessBeanFactory(beanFactory); ArgumentCaptor<BeanPostProcessor> captor = ArgumentCaptor.forClass(BeanPostProcessor.class); verify(beanFactory).addBeanPostProcessor(captor.capture()); assertTrue(captor.getValue() instanceof EventBusBeanPostProcessor); }