### Question:
RecursionExample { public String toBinary(int n){ if (n <= 1 ){ return String.valueOf(n); } return toBinary(n / 2) + String.valueOf(n % 2); }  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 testToBinary() { String b0 = recursion.toBinary(0); String b1 = recursion.toBinary(1); String b10 = recursion.toBinary(10); Assert.assertEquals("0", b0); Assert.assertEquals("1", b1); Assert.assertEquals("1010", b10); }