MonitorImpl extends HostListener implements Monitor { public void destroy() { backgroundTasksExecutorService.shutdown(); notificationExecutor.shutdown(); } MonitorImpl( PeerManager peerManager, DaoManager daoManager, HostRegistry hostRegistry ); void addAlertListener( AlertListener alertListener ); void removeAlertListener( AlertListener alertListener ); @Override Set<AlertListener> getAlertListeners(); void destroy(); @Override String getHistoricalMetrics( final Host host, final Date startTime, final Date endTime ); @Override void addAlert( final AlertEvent alert ); @Override ResourceHostMetrics getResourceHostMetrics(); @Override ResourceHostMetric getResourceHostMetric( final ResourceHost resourceHost ); @Override Collection<AlertEvent> getAlertEvents(); @Override List<AlertEvent> getAlertsQueue(); @Override void onHeartbeat( final ResourceHostInfo resourceHostInfo, final Set<QuotaAlertValue> alerts ); @Override void putAlert( final Alert alert ); @Override List<P2PInfo> getP2PStatuses(); @Override P2PInfo getP2pStatus( String rhId ); @Override HistoricalMetrics getMetricsSeries( final Host host, Date startTime, Date endTime );  }
@Test public void testDestroy() throws Exception { monitor.destroy(); verify( notificationService ).shutdown(); }