P04 { public static <T> int length(List<T> list) { return list.size(); }  static int length(List<T> list); static long lengthStream(List<T> list); static long lengthStream1(List<T> list); static int lengthRecursive(List<T> list);  }
@Test public void listOfEmptyListShouldBe0() throws Exception { int length = P04.length(Collections.emptyList()); assertThat(length, is(equalTo(0))); }
@Test public void shouldFindListOfNonEmptyList() throws Exception { assertThat(P04.length(Arrays.asList(1, 2, 3, 4, 5)), is(equalTo(5))); }