@Test public void should_report_using_log_reporter() throws ConfigurationException, InterruptedException { final CountDownLatch latch = new CountDownLatch(1); final LatchTestReporter latchTestReporter = new LatchTestReporter(null, GlobalConfiguration.getDefault(), latch); final List<Reporter> reporters = new ArrayList<Reporter>() { { add(latchTestReporter); add(new LogReporter(null, GlobalConfiguration.getDefault())); } }; final HeartbeatModule module = new HeartbeatModule(testConfiguration(), reporters, GlobalConfiguration.getDefault()); boolean wait = latch.await(200, TimeUnit.MILLISECONDS); module.stop(); assertThat(wait).isTrue(); }
@Override public void stop() { logger.trace("Stopping heartbeat module."); timer.cancel(); }
HeartbeatModule extends Module { @Override public void stop() { logger.trace("Stopping heartbeat module."); timer.cancel(); } }
HeartbeatModule extends Module { @Override public void stop() { logger.trace("Stopping heartbeat module."); timer.cancel(); } HeartbeatModule(ModuleConfiguration configuration, List<Reporter> reporters,
            final GlobalConfiguration globalConfiguration); }
HeartbeatModule extends Module { @Override public void stop() { logger.trace("Stopping heartbeat module."); timer.cancel(); } HeartbeatModule(ModuleConfiguration configuration, List<Reporter> reporters,
            final GlobalConfiguration globalConfiguration); @Override void stop(); }
HeartbeatModule extends Module { @Override public void stop() { logger.trace("Stopping heartbeat module."); timer.cancel(); } HeartbeatModule(ModuleConfiguration configuration, List<Reporter> reporters,
            final GlobalConfiguration globalConfiguration); @Override void stop();  }