public static boolean isNullOrEmpty(final Collection<?> list) {
    return list == null || list.size() == 0;
  }
@Test
  public void testIsNullOrEmptyCollection() {
    assertTrue(Utils.isNullOrEmpty((Collection<Void>) null));
    assertTrue(Utils.isNullOrEmpty(Collections.EMPTY_SET));
    assertFalse(Utils.isNullOrEmpty(Collections.singletonList(null)));
    assertFalse(Utils.isNullOrEmpty(Arrays.asList(new Object())));
    Collection<Object> l = new ArrayList<Object>();
    l.add(new Object());
    assertFalse(Utils.isNullOrEmpty(l));
  }