@Test(expected = IllegalStateException.class) public final void assertThatCallingStopWithoutHavingCalledStartFails() { final HazelcastService objectUnderTest = newObjectUnderTest(); objectUnderTest.stop(); }
@Override public void stop() { checkState(this.hazelcastInstance != null, "{} is not running", this); this.log.info("Shutting down Hazelcast instance {} ...", this.hazelcastInstance); this.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE); this.hazelcastInstance.shutdown(); this.log.info("{} shut down", this.hazelcastInstance); this.hazelcastInstance = null; }
HazelcastService implements SmartLifecycle { @Override public void stop() { checkState(this.hazelcastInstance != null, "{} is not running", this); this.log.info("Shutting down Hazelcast instance {} ...", this.hazelcastInstance); this.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE); this.hazelcastInstance.shutdown(); this.log.info("{} shut down", this.hazelcastInstance); this.hazelcastInstance = null; } }
HazelcastService implements SmartLifecycle { @Override public void stop() { checkState(this.hazelcastInstance != null, "{} is not running", this); this.log.info("Shutting down Hazelcast instance {} ...", this.hazelcastInstance); this.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE); this.hazelcastInstance.shutdown(); this.log.info("{} shut down", this.hazelcastInstance); this.hazelcastInstance = null; } HazelcastService(final Config configuration,
	        final MetricsRegistry metricsRegistry); }
HazelcastService implements SmartLifecycle { @Override public void stop() { checkState(this.hazelcastInstance != null, "{} is not running", this); this.log.info("Shutting down Hazelcast instance {} ...", this.hazelcastInstance); this.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE); this.hazelcastInstance.shutdown(); this.log.info("{} shut down", this.hazelcastInstance); this.hazelcastInstance = null; } HazelcastService(final Config configuration,
	        final MetricsRegistry metricsRegistry); @Override void start(); @Override void stop(); @Override boolean isRunning(); @Override int getPhase(); @Override boolean isAutoStartup(); @Override void stop(final Runnable callback); @Override String toString(); }
HazelcastService implements SmartLifecycle { @Override public void stop() { checkState(this.hazelcastInstance != null, "{} is not running", this); this.log.info("Shutting down Hazelcast instance {} ...", this.hazelcastInstance); this.metricsRegistry.removeMetric(getClass(), STARTUP_DURATION_GAUGE); this.hazelcastInstance.shutdown(); this.log.info("{} shut down", this.hazelcastInstance); this.hazelcastInstance = null; } HazelcastService(final Config configuration,
	        final MetricsRegistry metricsRegistry); @Override void start(); @Override void stop(); @Override boolean isRunning(); @Override int getPhase(); @Override boolean isAutoStartup(); @Override void stop(final Runnable callback); @Override String toString();  }