HystrixMetricsService extends AbstractIdleService { @Override protected void startUp() throws Exception { if (hystrixCodaHaleMetricsPublisher != null) { LOGGER.info("already started {}", serviceName()); return; } LOGGER.info("starting {}", serviceName()); hystrixCodaHaleMetricsPublisher = new HystrixCodaHaleMetricsPublisher(metricRegistry); getInstance().registerMetricsPublisher(hystrixCodaHaleMetricsPublisher); LOGGER.info("started {}", serviceName()); } @Inject  HystrixMetricsService(final MetricRegistry metricRegistry);   }
@Ignore("another strategy was already registered") @Test public void startUp() throws Exception { hystrixMetricsService.startUp(); }
@Test public void startUpAlreadyStarted() throws Exception { hystrixMetricsService.startUp(); hystrixMetricsService.startUp(); }