### Question:
Tree { public List<Character> preorder() { List<Character> preorder = new ArrayList<>(); preorder(root, preorder::add); return preorder; } Tree(Node root); List<Character> inorder(); List<Character> preorder(); List<Character> postorder();  }### Answer:
@Test public void preorder() { Tree tree = new Tree( new Node( 'A', new Node('B', null, new Node('C')), new Node('D', new Node('E'), new Node('F')))); assertThat(tree.preorder()) .containsExactly('A', 'B', 'C', 'D', 'E', 'F'); }