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

  var treeAfter =
      '[0]\n' +
      '-[2]\n' +
      '-[3]\n' +
      '-[4]\n' +
      '-[5]\n' +
      '--[6]\n' +
      '---[7]\n' +
      '----[8]\n' +
      '----[9]\n' +
      '-[10]\n';

  // Removing node n1.
  var removeResult = lf.tree.removeNode(nodes[1]);
  assertEquals(nodes[0], removeResult.parent);
  assertArrayEquals(
      [nodes[2], nodes[3], nodes[4]],
      removeResult.children);
  assertEquals(treeAfter, lf.tree.toString(nodes[0], stringFn));
}
Testing case where a node that has both parent and children nodes is removed.
Ensure that the children of the removed node are re-parented to its parent.