### Question:
ListMath { public static ListDouble limit(final ListDouble data, final int start, final int end) { return new ListDouble() { @Override public double getDouble(int index) { return data.getDouble(index + start); } @Override public int size() { return end - start; } }; } private  ListMath(); static ListDouble limit(final ListDouble data, final int start, final int end); static ListNumber limit(final ListNumber data, final int start, final int end); static ListLong limit(final ListLong data, final int start, final int end); static ListDouble rescale(final ListNumber data, final double factor, final double offset); static ListDouble inverseRescale(final ListNumber data, final double numerator, final double offset); static ListDouble pow(final ListNumber data, final double expon); static ListDouble pow(final double base, final ListNumber expons); static ListDouble add(final ListNumber data, final double offset); static ListDouble add(final ListNumber data1, final ListNumber data2); static ListDouble subtract(final ListNumber data1, final ListNumber data2); static ListDouble multiply(final ListNumber data1, final ListNumber data2); static ListDouble divide(final ListNumber data1, final ListNumber data2); static List<ListNumber> dft(ListNumber x, ListNumber y);  }### Answer:
@Test public void limit1() { ListDouble array1 = new ArrayDouble(0, 1, 2, 3, 4, 5); ListDouble limit = ListMath.limit(array1, 1, 5); ListDouble reference = new ArrayDouble(1, 2, 3, 4); assertThat(limit, equalTo(reference)); }
@Test public void limit2() { ListLong array1 = new ArrayLong(0, 1, 2, 3, 4, 5); ListLong limit = ListMath.limit(array1, 1, 5); ListLong reference = new ArrayLong(1, 2, 3, 4); assertThat(limit, equalTo(reference)); }