@Test public void fibonacciTest() { Fibonacci fibonacci = new Fibonacci(); long[] fibonaccies = new long[10]; for(int i = 0; i < 10; i++){ fibonaccies[i] = fibonacci.fibonacci(i); } Assert.assertEquals(0, fibonaccies[0]); Assert.assertEquals(1, fibonaccies[1]); Assert.assertEquals(1, fibonaccies[2]); Assert.assertEquals(2, fibonaccies[3]); Assert.assertEquals(3, fibonaccies[4]); Assert.assertEquals(5, fibonaccies[5]); Assert.assertEquals(8, fibonaccies[6]); Assert.assertEquals(13, fibonaccies[7]); Assert.assertEquals(21, fibonaccies[8]); Assert.assertEquals(34, fibonaccies[9]); }
public long fibonacci(int number) { if (number <= 1) { return number; } return fibonacci(number - 1) + fibonacci(number - 2); }
Fibonacci { public long fibonacci(int number) { if (number <= 1) { return number; } return fibonacci(number - 1) + fibonacci(number - 2); } }
Fibonacci { public long fibonacci(int number) { if (number <= 1) { return number; } return fibonacci(number - 1) + fibonacci(number - 2); }  }
Fibonacci { public long fibonacci(int number) { if (number <= 1) { return number; } return fibonacci(number - 1) + fibonacci(number - 2); }  long fibonacci(int number); }
Fibonacci { public long fibonacci(int number) { if (number <= 1) { return number; } return fibonacci(number - 1) + fibonacci(number - 2); }  long fibonacci(int number);  }