QuotaChecker { int getListSize(List<?> list) { return (list == null) ? 0 : list.size(); } QuotaChecker(); Quota getDomainQuota(ObjectStoreConnection con, String domainName);  }
@Test public void testGetListSize() { QuotaChecker quotaCheck = new QuotaChecker(); assertEquals(quotaCheck.getListSize(null), 0); ArrayList<String> list = new ArrayList<>(); assertEquals(quotaCheck.getListSize(list), 0); list.add("test1"); assertEquals(quotaCheck.getListSize(list), 1); list.add("test2"); list.add("test3"); assertEquals(quotaCheck.getListSize(list), 3); }