### Question:
RecursionExample { public int calculateTreeHeight(BinaryNode root){ if (root!= null){ if (root.getLeft() != null || root.getRight() != null){ return 1 + max(calculateTreeHeight(root.left) , calculateTreeHeight(root.right)); } } return 0; }  int sum(int n); int tailSum(int currentSum, int n); int iterativeSum(int n); int powerOf10(int n); int fibonacci(int n); String toBinary(int n); int calculateTreeHeight(BinaryNode root); int max(int a,int b);  }### Answer:
@Test public void testCalculateTreeHeight() { BinaryNode root = new BinaryNode(1); root.setLeft(new BinaryNode(1)); root.setRight(new BinaryNode(1)); root.getLeft().setLeft(new BinaryNode(1)); root.getLeft().getLeft().setRight(new BinaryNode(1)); root.getLeft().getLeft().getRight().setLeft(new BinaryNode(1)); root.getRight().setLeft(new BinaryNode(1)); root.getRight().getLeft().setRight(new BinaryNode(1)); int height = recursion.calculateTreeHeight(root); Assert.assertEquals(4, height); }