@Test public void fibonacciMatchesOpeningSequence() { List<Long> fibonacciSequence = Arrays.asList(0L, 1L, 1L, 2L, 3L, 5L, 8L, 13L, 21L, 34L); IntStream.range(0, fibonacciSequence.size()) .forEach(x -> { Fibonacci fibonacci = new Fibonacci(); long result = fibonacci.fibonacci(x); long expectedResult = fibonacciSequence.get(x); assertEquals(expectedResult, result); }); }
public Fibonacci() { }
Fibonacci { public Fibonacci() { } }
Fibonacci { public Fibonacci() { } Fibonacci(); }
Fibonacci { public Fibonacci() { } Fibonacci(); long fibonacci(int x); }
Fibonacci { public Fibonacci() { } Fibonacci(); long fibonacci(int x);  }