@Test public void postProcessBeforeDestruction() { Subscriber subscriber = new Subscriber(); beanPostProcessor.postProcessBeforeDestruction(subscriber, "subscriber"); verify(eventBus).unregister(subscriber); }
@Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (eventBus != null) { eventBus.unregister(bean); } }
EventBusBeanPostProcessor implements DestructionAwareBeanPostProcessor { @Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (eventBus != null) { eventBus.unregister(bean); } } }
EventBusBeanPostProcessor implements DestructionAwareBeanPostProcessor { @Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (eventBus != null) { eventBus.unregister(bean); } } EventBusBeanPostProcessor(BeanFactory beanFactory); }
EventBusBeanPostProcessor implements DestructionAwareBeanPostProcessor { @Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (eventBus != null) { eventBus.unregister(bean); } } EventBusBeanPostProcessor(BeanFactory beanFactory); @Override Object postProcessBeforeInitialization(Object bean, String beanName); @Override Object postProcessAfterInitialization(Object bean, String beanName); @Override void postProcessBeforeDestruction(Object bean, String beanName); }
EventBusBeanPostProcessor implements DestructionAwareBeanPostProcessor { @Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (eventBus != null) { eventBus.unregister(bean); } } EventBusBeanPostProcessor(BeanFactory beanFactory); @Override Object postProcessBeforeInitialization(Object bean, String beanName); @Override Object postProcessAfterInitialization(Object bean, String beanName); @Override void postProcessBeforeDestruction(Object bean, String beanName);  }