NotificationForwarder implements NotificationProcessor { public void destroy() { try { m_aggregator.removeProcessor(this); } catch (DispatchException ex) { LOGGER.error("NotificationForwarder destroy failed"); } } NotificationForwarder(Aggregator aggregator, NotificationService notificationService); void init(); void destroy(); @Override void publishNotification(Notification notification);  }
@Test public void destroy() throws Exception { m_notificatonForwarder.destroy(); verify(m_aggregator).removeProcessor(m_notificatonForwarder); }