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

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

  // Removing node n2.
  var removeResult = lf.tree.removeNode(nodes[2]);
  assertEquals(nodes[1], removeResult.parent);
  assertArrayEquals([], removeResult.children);
  assertEquals(treeAfter, lf.tree.toString(nodes[0], stringFn));
}
Testing case where a leaf node is removed.