Problem4_2 { public static IntPair maximize_sorted(int[] numbers) { return new IntPair(numbers[0], numbers[numbers.length - 1]); }  static IntPair maximize_unsorted(int[] numbers); static IntPair maximize_sorted(int[] numbers); static IntPair minimize_unsorted(int[] numbers); static IntPair minimize_sorted(int[] sorted);  }
@Test public void shouldFindPairThatMaximizeWithinSortedArray() throws Exception { int[] numbers = {3, 6, 8, 13, 19}; IntPair p = Problem4_2.maximize_sorted(numbers); assertThat(p, equalTo(new IntPair(3, 19))); }