Factorial { public int getTailRecursive(int n) { validateInput(n); return getTailRecursiveInner(n, 1); }  int getIterative(int n); int getRecursive(int n); int getTailRecursive(int n);  }
@Test(expected = IllegalArgumentException.class) public void shouldNotCalculateFactorialOfNegativeIntegersTailRecursive() { factorial.getTailRecursive(-1); }
@Test public void factorialOfZeroEqualsToOneTailRecursive() { int result = factorial.getTailRecursive(0); assertEquals(1, result); }
@Test public void factorialOfFiveEqualsTo120TailRecursive() { int result = factorial.getTailRecursive(5); assertEquals(120, result); }
@Test public void factorialOfSevenEqualsTo5040TailRecursive() { int result = factorial.getTailRecursive(7); assertEquals(5040, result); }