@@ -0,0 +1,706 @@
+package com.insightfullogic.java8.test.chapter5;%0D%0A%0D%0Aimport static org.junit.Assert.*;%0D%0A%0D%0Aimport java.util.Arrays;%0D%0Aimport java.util.List;%0D%0Aimport java.util.stream.IntStream;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport com.insightfullogic.java8.answers.chapter5.Fibonacci;%0D%0A%0D%0Apublic class FibonacciTest %7B%0D%0A%0D%0A%09@Test%0D%0A%09public void testFibonacci() %7B%0D%0A%0D%0A%09%09List%3CLong%3E fibonacciSequence = Arrays.asList(0L, 1L, 1L, 2L, 3L, 5L, 8L, 13L, 21L, 34L, 55L);%0D%0A%0D%0A%09%09// %D2%B2%0D%0A%09%09IntStream.range(0, fibonacciSequence.size()).forEach(x -%3E %7B%0D%0A%09%09%09Fibonacci fibonacci = new Fibonacci();%0D%0A%09%09%09long result = fibonacci.fibonacci(x);%0D%0A%09%09%09long expectedResult = fibonacciSequence.get(x);%0D%0A%09%09%09assertEquals(expectedResult, result);%0D%0A%09%09%7D);%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

test Fibonacci in chapter5