function testSelfJoinTree() {
  var treeBefore =
      'project()\n' +
      '-join(type: inner, impl: hash, join_pred(t1.id eq t2.id))\n' +
      '--table_access(TableA as t1)\n' +
      '--table_access(TableA as t2)\n';

  var treeAfter =
      'project()\n' +
      '-join(type: inner, impl: index_nested_loop, ' +
          'join_pred(t1.id eq t2.id))\n' +
      '--table_access(TableA as t1)\n' +
      '--no_op_step(t2)\n';

  lf.testing.treeutil.assertTreeTransformation(
      constructTree1(
          schema.table('TableA').as('t1'),
          schema.table('TableA').as('t2'), false),
      treeBefore, treeAfter, pass);
}
Tests a simple tree, where
 - Only one join predicate exists, which is a self-join.
 - Both columns of the join predicate have an index.
Ensures that index join is chosen for the right table, and that a NoOpStep
is inserted in the tree for the chosen table.