@@ -0,0 +1,1413 @@
+package data;%0A%0Aimport static data.DoubleFunctions.*;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0A%0Aimport org.junit.Test;%0A%0Apublic class DoubleFunctionSpec %7B%0A  %0A  @Test%0A  public void whenNewArrayCreatedOutputValuesEqualToInputValues() %7B%0A    double%5B%5D expected = new double%5B%5D %7B3.0, 7.5, 10.0%7D;%0A    double%5B%5D actual = newArray(3.0, 7.5, 10.0);%0A    assertThat(actual, is(equalTo(expected))); %0A  %7D%0A  %0A  @Test%0A  public void whenNewArrayCreatedWithEmptyArgumentListEmptyArrayReturned() %7B%0A    double%5B%5D expected = new double%5B%5D %7B%7D;%0A    double%5B%5D actual = newArray();%0A    assertThat(actual, is(equalTo(expected)));%0A  %7D%0A  %0A  @Test%0A  public void whenFillMethodThenArrayFilledWithGivenValue() %7B%0A    double%5B%5D expected = new double%5B%5D %7B1.0, 1.0, 1.0, 1.0, 1.0%7D;%0A    double%5B%5D actual = fill(5, 1.0);%0A    assertThat(actual, is(equalTo(expected)));%0A  %7D%0A  %0A  @Test%0A  public void whenArraySlicedValuesWithinSliceRangeReturned() %7B%0A    double%5B%5D expected = new double%5B%5D %7B2.0, 4.5, -3.0, 9.2, 2.1%7D;%0A    double%5B%5D data = newArray(1.3, 7.0, 2.0, 4.5, -3.0, 9.2, 2.1, 7.4);%0A    double%5B%5D actual = slice(data, 2, 7);%0A    assertThat(actual, is(equalTo(expected)));%0A  %7D%0A  %0A  @Test%0A  public void whenSqrtMethodThenSqrtOfEachValueReturned() %7B%0A    double%5B%5D data = newArray(1.0, 4.0, 9.0, 16.0);%0A    double%5B%5D expected = newArray(1.0, 2.0, 3.0, 4.0);%0A    assertThat(sqrt(data), is(equalTo(expected)));%0A  %7D%0A%0A%7D%0A

Add spec for DoubleFunction.