Controller implements NetworkConnectionListener { public void saveSettings() { settingsSaver.saveSettings(); } Controller(final UserInterface ui, final Settings settings, final SettingsSaver settingsSaver,
                      final CoreMessages coreMessages, final ErrorHandler errorHandler); void start(); Topic getTopic(); UserList getUserList(); boolean isWrote(); void changeWriting(final int code, final boolean writing); void updateMeWriting(final boolean isCurrentlyWriting); void goAway(final String awayMessage); void comeBack(); void changeAwayStatus(final int code, final boolean away, final String awaymsg); boolean isNickInUse(final String nick); boolean isNewUser(final int code); void changeMyNick(final String newNick); void changeNick(final int code, final String nick); void saveSettings(); @Nullable User getUser(final int code); @Nullable User getUser(final String nick); void logOn(); void logOff(final boolean removeUsers); void removeUser(final User user, final String privateSystemMessage); void cancelFileTransfers(final User user); void shutdown(); void sendExposeMessage(); void sendExposingMessage(); void sendGetTopicMessage(); void sendIdleMessage(); void sendChatMessage(final String msg); void sendTopicRequestedMessage(); void changeTopic(final String newTopic); void sendNickCrashMessage(final String nick); 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); TransferList getTransferList(); WaitingList getWaitingList(); void updateAfterTimeout(); void sendClientInfo(); void sendPrivateMessage(final String privmsg, final User user); void changeNewMessage(final int code, final boolean newMsg); boolean isConnected(); void checkNetwork(); boolean isLoggedOn(); AutoCompleter getAutoCompleter(); @Override void beforeNetworkCameUp(); @Override void networkCameUp(final boolean silent); @Override void networkWentDown(final boolean silent); ChatState getChatState(); JMXBeanLoader createJMXBeanLoader(); void registerNetworkConnectionListener(final NetworkConnectionListener listener);  }
@Test public void saveSettingsShouldUseSettingsSaver() { controller.saveSettings(); verify(settingsSaver).saveSettings(); }