### Question:
MutableBinaryTreeImpl implements MutableBinaryTree<E, MutableBinaryTreeNode<E>> { @Override public MutableBinaryTreeNode<E> setRoot(E root) { final MutableBinaryTreeNodeImpl<E> newRoot = new MutableBinaryTreeNodeImpl<>(root); setRootInternal(newRoot); return newRoot; } MutableBinaryTreeImpl();   MutableBinaryTreeImpl(MutableBinaryTreeNodeImpl<E> root); @Override MutableBinaryTreeNode<E> getRoot(); @Override MutableBinaryTreeNode<E> setRoot(E root); static TypeKey<MutableBinaryTreeImpl<E>> typeKey();  }### Answer:
@Test public void setRoot() { final MutableBinaryTreeImpl<String> tree = new MutableBinaryTreeImpl<>(); assertTrue(tree.isEmpty()); final MutableBinaryTreeNode<String> node = tree.setRoot("a"); assertEquals("a", node.getElement()); assertFalse(tree.isEmpty()); assertSame(node, tree.getRoot()); }