@Test public void shouldReturnTrueIfTreesAreEqualsRecursive() { BinaryNode<Integer> root = new BinaryNode<Integer>(0); BinaryNode<Integer> n1 = new BinaryNode<Integer>(1); BinaryNode<Integer> n2 = new BinaryNode<Integer>(2); BinaryNode<Integer> n3 = new BinaryNode<Integer>(3); root.setLeft(n1); root.setRight(n2); n1.setLeft(n3); BinaryNode<Integer> root1 = new BinaryNode<Integer>(0); BinaryNode<Integer> n11 = new BinaryNode<Integer>(1); BinaryNode<Integer> n21 = new BinaryNode<Integer>(2); BinaryNode<Integer> n31 = new BinaryNode<Integer>(3); root.setLeft(n11); root.setRight(n21); n1.setLeft(n31); assertFalse(binaryTreeEquals.areEqualsRecursive(root, root1)); }
public boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2) { validateInput(tree1, tree2); return areEqualsInner(tree1, tree2); }
BinaryTreeEquals { public boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2) { validateInput(tree1, tree2); return areEqualsInner(tree1, tree2); } }
BinaryTreeEquals { public boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2) { validateInput(tree1, tree2); return areEqualsInner(tree1, tree2); }  }
BinaryTreeEquals { public boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2) { validateInput(tree1, tree2); return areEqualsInner(tree1, tree2); }  boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2); boolean areEqualsIterative(BinaryNode<Integer> tree1, BinaryNode<Integer> tree2); }
BinaryTreeEquals { public boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2) { validateInput(tree1, tree2); return areEqualsInner(tree1, tree2); }  boolean areEqualsRecursive(BinaryNode tree1, BinaryNode tree2); boolean areEqualsIterative(BinaryNode<Integer> tree1, BinaryNode<Integer> tree2);  }