### Question:
Issue { @Override public String toString() { return check.getClass().getSimpleName() + ": " + primaryMessage.toString() + " " + Arrays.stream(secondaryMessages).map(Message::toString).collect(Collectors.joining(" ")); } Issue(Check check, Message primaryMessage, @Nullable Double effortToFix, Message... secondaryMessages); static Issue issueOnFile(Check check, String message); static Issue issueOnLine(Check check, int line, String message); Check getCheck(); boolean hasNodeLocation(); boolean hasLineLocation(); String getMessage(); Message getPrimary(); Message[] getSecondaries(); @Nullable Double getEffortToFix(); @Override String toString();  }### Answer:
@Test void message_to_string() { Set<UastNode.Kind> noKind = Collections.emptySet(); List<UastNode> noChild = Collections.emptyList(); UastNode node1 = new UastNode(noKind, "", new UastNode.Token(42, 7, "{"), noChild); UastNode node2 = new UastNode(noKind, "", new UastNode.Token(54, 3, "}"), noChild); Issue.Message message1 = new Issue.Message(node1, node2, "a message"); assertThat(message1.toString()).isEqualTo("([42:7 {], [54:3 }]) a message"); Issue.Message message2 = new Issue.Message(node1, node2, null); assertThat(message2.toString()).isEqualTo("([42:7 {], [54:3 }])"); }