HystrixMetricsService extends AbstractIdleService { @Override protected void shutDown() throws Exception { if (hystrixCodaHaleMetricsPublisher == null) { LOGGER.info("already stopped {}", serviceName()); return; } LOGGER.info("stopping {}", serviceName()); hystrixCodaHaleMetricsPublisher = null; LOGGER.info("stopped {}", serviceName()); } @Inject  HystrixMetricsService(final MetricRegistry metricRegistry);   }
@Test public void shutDown() throws Exception { hystrixMetricsService.shutDown(); }
@Test public void shutDownAlreadyShutdown() throws Exception { hystrixMetricsService.shutDown(); hystrixMetricsService.shutDown(); }