### Question:
RemoteSuiteLauncher implements SuiteLauncher, DaemonListener { @Override public void shutdownDaemon() { if (daemon == null) { throw new IllegalStateException("cannot shutdown; daemon not connected"); } daemon.shutdown(); } RemoteSuiteLauncher(ActorThread currentThread, ActorRef<DaemonSummoner> daemonSummoner); @Override void runTests(SuiteConfiguration suiteConfiguration,
                         DaemonConfiguration daemonConfiguration,
                         MessageSender<Event<SuiteListener>> suiteListener); @Override void shutdownDaemon(); @Override void onConnected(NetworkConnection connection, MessageSender<Event<RequestListener>> daemon); @Override void onMessage(Event<SuiteListener> message); @Override void onDisconnected();  }### Answer:
@Test public void shutdown_command_fails_if_the_daemon_is_not_connected() { thrown.expect(IllegalStateException.class); thrown.expectMessage("daemon not connected"); suiteLauncher.shutdownDaemon(); }