P18 { public static <T> List<T> slice(List<T> list, int start, int end) { return list.subList(start - 1, end); }  static List<T> slice(List<T> list, int start, int end);  }
@Test public void shouldGiveSliceOfAList() throws Exception { List<String> slice = P18.slice(Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h", "i", "k"), 3, 7); assertThat(slice, hasSize(5)); assertThat(slice, contains("c", "d", "e", "f", "g")); }