JavaScriptTree implements Tree { @Override public String toString() { StringBuilder sb = new StringBuilder(); Iterator<Tree> children = childrenIterator(); while (children.hasNext()) { sb.append(children.next()); sb.append(" "); } return sb.toString(); }  @Override final boolean is(Kinds... kind); abstract Kind getKind(); abstract Iterator<Tree> childrenIterator(); boolean isLeaf(); @Override SyntaxToken lastToken(); @Override SyntaxToken firstToken(); @Override boolean isAncestorOf(Tree tree); @Override Stream<JavaScriptTree> descendants(); @Override Stream<Tree> childrenStream(); void setParent(Tree parent); @Override Tree parent(); @Override String toString();  }
@Test public void to_string() throws Exception { assertThat(tree.toString()).isEqualTo("child child "); }