function testRemoveNode_Root() {
  var nodes = createTestTree1();

  var subTree1After =
      '[1]\n' +
      '-[2]\n' +
      '-[3]\n' +
      '-[4]\n';

  var subTree2After =
      '[5]\n' +
      '-[6]\n' +
      '--[7]\n' +
      '---[8]\n' +
      '---[9]\n';

  var subTree3After = '[10]\n';

  // Removing node n0.
  var removeResult = lf.tree.removeNode(nodes[0]);
  assertNull(removeResult.parent);
  assertArrayEquals([nodes[1], nodes[5], nodes[10]], removeResult.children);
  assertEquals(
      subTree1After, lf.tree.toString(removeResult.children[0], stringFn));
  assertEquals(
      subTree2After, lf.tree.toString(removeResult.children[1], stringFn));
  assertEquals(
      subTree3After, lf.tree.toString(removeResult.children[2], stringFn));
}
Testing case where the root node is removed.