Fibonacci { public static long compute(int n) { if (n == 0) { return 0; } if (n == 1) { return 1; } long a = 0; long b = 1; long c = 0; for (int i = 2; i <= n; i++) { c = a + b; a = b; b = c; } return c; }  static long compute(int n); static long computeLessThanFourMillion(); static boolean checkeven(int n);  }
@Test public void if_input_is_1_should_return_1() { Assertions.assertThat(Fibonacci.compute(1)).isEqualTo(1); }
@Test public void if_input_is_10() { Assertions.assertThat(Fibonacci.compute(10)).isEqualTo(55); }
@Test public void if_input_is_4000000() { Assertions.assertThat(Fibonacci.compute(4000000)).isEqualTo(6558868233897966651L); }