@Test
public void detach() {

	final TreeNode<Integer> tree = TreeNode.of(0)
		.attach(TreeNode.of(1)
			.attach(TreeNode.of(3))
			.attach(TreeNode.of(4)))
		.attach(TreeNode.of(2)
			.attach(TreeNode.of(5))
			.attach(TreeNode.of(6)));
	Assert.assertEquals(tree.size(), 7);
	final TreeNode<Integer> detached = tree.childAt(1).detach();
	Assert.assertEquals(tree.size(), 4);
	Assert.assertEquals(detached.size(), 3);
}