### Question:
DaemonNetworkEndpoint implements NetworkEndpoint<Event<RequestListener>, Event<SuiteListener>>, RequestListener { @Override public void onConnected(NetworkConnection connection, MessageSender<Event<SuiteListener>> sender) { this.sender = sender; startupTimeout.cancel(); connections.checkIn(); } DaemonNetworkEndpoint(SuiteFactory suiteFactory, Runnable shutdownHook, Timeout startupTimeout, Timeout idleTimeout, DaemonDir daemonDir); @Override void onConnected(NetworkConnection connection, MessageSender<Event<SuiteListener>> sender); @Override void onDisconnected(); @Override void onMessage(Event<RequestListener> message); @Override void runTests(SuiteConfiguration suite); @Override void shutdown();  }### Answer:
@Test public void cancels_the_startup_timeout_when_the_first_user_connects() { assertThat("timeout before connected", startupTimeout.willTimeOut, is(true)); endpoint.onConnected(unimportantConnection, unimportantSender); assertThat("timeout after connected", startupTimeout.willTimeOut, is(false)); }