### Question:
ShutdownMonitor { public synchronized boolean hasShutdown() { return shutdown; } @Inject  ShutdownMonitor(ShutdownManager shutdownManager); synchronized boolean hasShutdown();  }### Answer:
@Test public void shouldNotSignalShutdownWhenNot() { assertThat(monitor.hasShutdown()).isFalse(); }
@Test public void shouldSignalShutdownWhenShutdown() { listener.shutdown(); assertThat(monitor.hasShutdown()).isTrue(); }