Factorial { public int getRecursive(int n) { validateInput(n); if (n == 0) { return 1; } else { return n * getRecursive(n - 1); } }  int getIterative(int n); int getRecursive(int n); int getTailRecursive(int n);  }
@Test(expected = IllegalArgumentException.class) public void shouldNotCalculateFactorialOfNegativeIntegersRecursive() { factorial.getRecursive(-1); }
@Test public void factorialOfZeroEqualsToOneRecursive() { int result = factorial.getRecursive(0); assertEquals(1, result); }
@Test public void factorialOfFiveEqualsTo120Recursive() { int result = factorial.getRecursive(5); assertEquals(120, result); }
@Test public void factorialOfSevenEqualsTo5040Recursive() { int result = factorial.getRecursive(7); assertEquals(5040, result); }