Topic { @Override public String toString() { return topic + " (" + nick + ")"; } Topic();  Topic(final String topic, final String nick, final long time); void changeTopic(final String topic, final String nick, final long time); void changeTopic(final Topic topic); void resetTopic(); String getNick(); long getTime(); String getTopic(); boolean hasTopic(); @Override String toString();  }
@Test public void toStringShouldIncludeBothTopicAndUser() { final Topic topic = new Topic("Nice day today", "Kenny", 50); assertEquals("Nice day today (Kenny)", topic.toString()); }