SquareRoot { public float calculateSquareRootRecursive(int number) { return sqrtRecursiveInner(number, 0, number); }  float calculateSquareRootIterative(int number); float calculateSquareRootRecursive(int number);  }
@Test public void squareRootOfFourEqualsToTwoRecursiveIterative() { float result = squareRoot.calculateSquareRootRecursive(4); assertEquals(2, result, DELTA); }
@Test public void squareRootOfNineEqualsToThreeRecursive() { float result = squareRoot.calculateSquareRootRecursive(9); assertEquals(3, result, DELTA); }
@Test public void shouldCalculateNonPerfectSquaresRecursive() { float result = squareRoot.calculateSquareRootRecursive(7); assertEquals(2.64575f, result, DELTA); }
@Test public void shouldCalculateSquaresOfTwoDigitsRecursive() { float result = squareRoot.calculateSquareRootRecursive(12); assertEquals(3.46410f, result, DELTA); }