private List<E> ofSize(int size) {
      Assert.assertEquals(list.toString(),  size, list.size());
      return list;
    }
Helper class that lets you check the size and return the list in one line.

@param <E>
ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/AuthorizationTestUtil.java