package com.github.acme.learning.threading;

import org.fest.assertions.api.Assertions;
import org.junit.Test;

/**
 * @author alex.dobjanschi
 * @since 3:57 PM 12/15/13
 */
public abstract class AbstractFibonacciTest {

    /**
     * Get a new instance of {@link FibonacciComputer}.
     * @return
     */
    protected abstract FibonacciComputer computer();

    @Test(expected = IllegalArgumentException.class)
    public void shouldRejectNegativeNumbers() {
        // when
        // then
        computer().computeFibonacciAtIndex(-2);
        // assert
    }

    @Test
    public void shouldComputeFibonacciCorrectly1() {
        // when
        // then
        long value1 = computer().computeFibonacciAtIndex(5);
        // assert
        Assertions.assertThat(value1).isEqualTo(3);
    }

    @Test
    public void shouldComputeFibonacciCorrectly2() {
        // when
        // then
        long value1 = computer().computeFibonacciAtIndex(10);
        // assert
        Assertions.assertThat(value1).isEqualTo(34);
    }
}

@@ -1027,11 +1027,939 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void shouldComputeFibonacciCorrectly3()%7B%0A        // when%0A        // then%0A        long value1 = computer().computeFibonacciAtIndex(1);%0A        // assert%0A        Assertions.assertThat(value1).isEqualTo(0);%0A    %7D%0A%0A    @Test%0A    public void shouldComputeFibonacciCorrectly4()%7B%0A        // when%0A        // then%0A        long value1 = computer().computeFibonacciAtIndex(2);%0A        // assert%0A        Assertions.assertThat(value1).isEqualTo(1);%0A    %7D%0A%0A    @Test%0A    public void shouldComputeFibonacciCorrectly5()%7B%0A        // when%0A        // then%0A        long value1 = computer().computeFibonacciAtIndex(3);%0A        // assert%0A        Assertions.assertThat(value1).isEqualTo(1);%0A    %7D%0A%0A    @Test%0A    public void shouldComputeFibonacciCorrectly6()%7B%0A        // when%0A        // then%0A        long value1 = computer().computeFibonacciAtIndex(4);%0A        // assert%0A        Assertions.assertThat(value1).isEqualTo(2);%0A    %7D
 %0A%7D%0A

Add single threaded implementation.