Lists { public static boolean isNotEmpty(final List<?> list) { return !isEmpty(list); } private  Lists(); static List<T> createWhenNull(final List<T> list); static List<T> create(final T item); static T firstEntry(final List<T> list); static boolean isEmpty(final List<?> list); static boolean isNotEmpty(final List<?> list); static boolean sizeIs(final List<?> list, final int size); static List<T> emptyToNull(final List<T> list);  }
@Test public void testIsNotEmpty() { final List<Integer> nullList = null; final List<Integer> listWithoutEntries = new ArrayList<Integer>(); final List<Integer> listWithOneEntry = Arrays.asList(1); assertThat(Lists.isNotEmpty(nullList), is(false)); assertThat(Lists.isNotEmpty(listWithoutEntries), is(false)); assertThat(Lists.isNotEmpty(listWithOneEntry), is(true)); }