@Test public void exitMessageTest() { when(connectionConfig.username()).thenReturn("bob"); when(connectionConfig.driverUrl()).thenReturn("bolt: UserMessagesHandler userMessagesHandler = new UserMessagesHandler(connectionConfig, "3.1.0-Beta99"); assertEquals("\nBye!", userMessagesHandler.getExitMessage()); }
@Nonnull public String getExitMessage() { return AnsiFormattedText.s().append("\nBye!").formattedString(); }
UserMessagesHandler { @Nonnull public String getExitMessage() { return AnsiFormattedText.s().append("\nBye!").formattedString(); } }
UserMessagesHandler { @Nonnull public String getExitMessage() { return AnsiFormattedText.s().append("\nBye!").formattedString(); } UserMessagesHandler(@Nonnull ConnectionConfig connectionConfig, @Nonnull String serverVersion); }
UserMessagesHandler { @Nonnull public String getExitMessage() { return AnsiFormattedText.s().append("\nBye!").formattedString(); } UserMessagesHandler(@Nonnull ConnectionConfig connectionConfig, @Nonnull String serverVersion); @Nonnull String getWelcomeMessage(); @Nonnull String getExitMessage(); }
UserMessagesHandler { @Nonnull public String getExitMessage() { return AnsiFormattedText.s().append("\nBye!").formattedString(); } UserMessagesHandler(@Nonnull ConnectionConfig connectionConfig, @Nonnull String serverVersion); @Nonnull String getWelcomeMessage(); @Nonnull String getExitMessage();  }