HiccupModule extends Module { @Override public void stop() { logger.trace("Stopping hiccup module."); try { thread.join(1000); } catch (InterruptedException e) { logger.error("Hiccup thread failed to stop", e); } } HiccupModule(ModuleConfiguration configuration, List<Reporter> reporters,
            GlobalConfiguration globalConfiguration); @Override void stop();  }
@Test public void should_initialize_module() throws ConfigurationException, InterruptedException { final HiccupModule module = new HiccupModule(testConfiguration(), testReporters(), GlobalConfiguration.getDefault()); module.stop(); }
@Test public void should_report_hiccup_when_started() throws ConfigurationException, InterruptedException { final CountDownLatch latch = new CountDownLatch(1); final LatchTestReporter testReporter = new LatchTestReporter(null, GlobalConfiguration.getDefault(), latch); final List<Reporter> reporters = new ArrayList<Reporter>() { { add(testReporter); } }; final HiccupModule module = new HiccupModule(testConfiguration(), reporters, GlobalConfiguration.getDefault()); boolean wait = latch.await(1100, TimeUnit.MILLISECONDS); module.stop(); assertThat(wait).isTrue(); }