NetworkMessages { public void sendLogonMessage() { final String msg = createMessage(LOGON); networkService.sendMessageToAllUsers(msg); } NetworkMessages(final NetworkService networkService, final Settings settings); void sendIdleMessage(); void sendTopicChangeMessage(final Topic topic); void sendTopicRequestedMessage(final Topic topic); void sendAwayMessage(final String awayMsg); void sendBackMessage(); void sendChatMessage(final String chatMsg); void sendLogonMessage(); void sendLogoffMessage(); void sendExposeMessage(); void sendExposingMessage(); void sendGetTopicMessage(); void sendWritingMessage(); void sendStoppedWritingMessage(); void sendNickMessage(final String newNick); void sendNickCrashMessage(final String crashNick); void sendFileAbort(final User user, final int fileHash, final String fileName); void sendFileAccept(final User user, final int port,
            final int fileHash, final String fileName); void sendFile(final User user, final FileToSend file); void sendClient(); void sendPrivateMessage(final String privMsg, final User user);  }
@Test public void testSendLogonMessage() { messages.sendLogonMessage(); verify(service).sendMessageToAllUsers(createMessage("LOGON")); }