@Test
  public void arrayOfTwosAutocorrelationReturnsAValueEqualToLengthMinusLagTimesFour() {
    for (int i = 0; i < arrayOfTwos.length; i++) {
      double autocorrelate = autocorrelation.autocorrelate(arrayOfTwos, i);

      assertThat(autocorrelate, is(equalTo((arrayOfTwos.length - i) * 4.0d)));
    }
  }
 @Test(expected = IndexOutOfBoundsException.class)
 public void lagUpperBoundIsTestedBeforeMethodExecutes() {
   autocorrelation.autocorrelate(arrayOfTwos, arrayOfTwos.length + 1);
 }