### Question:
ZkTreeModel extends DefaultTreeModel<E> { public TreeNode<E> removeChild(int... path) { TreeNode<E> toRemove = getChild(path); if (toRemove != null) { toRemove.getParent().remove(toRemove); } return toRemove; } ZkTreeModel(@Nonnull TreeNode<E> root); TreeNode<E> find(@Nonnull E data); @Override TreeNode<E> getChild(int... path); E getChildData(int... path); E getSelectedData(@Nonnegative int depth); TreeNode<E> removeSelected(); TreeNode<E> removeChild(int... path); ZkTreeNode<E> addExpandableNode(E data, int... parentNodePath); void dropNodeBefore(TreeNode<E> node, TreeNode<E> target); void dropNodeIn(TreeNode<E> node, TreeNode<E> target); void setSelectedNode(TreeNode<E> node);  }### Answer:
@Test public void testRemoveChild() throws Exception { TreeNode<String> childToRemove = sut.getChild(1, 1); assertSame(sut.removeChild(1, 1), childToRemove); assertNotSame(sut.getChild(1, 1), childToRemove); }
@Test public void testRemoveChild_thatDoesntExist() throws Exception { assertNull(sut.removeChild(0, 100)); }