void () { StringBuilder sb = new StringBuilder(); TreeTraversal.TracingIt<Integer> it = numTraverser().withTraversal(TreeTraversal.BI_ORDER_DFS).traverse().typedIterator(); while (it.advance()) { if (sb.length() != 0) sb.append(", "); it.hasNext(); sb.append(it.current()).append(it.isDescending() ? "↓" : "↑"); } assertEquals("1↓, 2↓, 5↓, 5↑, 6↓, 6↑, 7↓, 7↑, 2↑, 3↓, 8↓, 8↑, 9↓, 9↑, 10↓, 10↑, 3↑, 4↓, 11↓, 11↑, 12↓, 12↑, 13↓, 13↑, 4↑, 1↑", sb.toString()); }