@Test void testLength() { assertEquals(0, Util.length(null)); assertEquals(-1, Util.length(1234)); assertEquals(0, Util.length(StringPool.EMPTY)); assertEquals(4, Util.length("abcd")); Collection<String> coll = new ArrayList<>(); assertEquals(0, Util.length(coll)); coll.add("abcd"); coll.add("1234"); assertEquals(2, Util.length(coll)); Iterator<String> iterator = coll.iterator(); assertEquals(2, Util.length(iterator)); Map<Long, String> map = new HashMap<>(); assertEquals(0, Util.length(map)); map.put(1l, "abcd"); map.put(2l, "1234"); assertEquals(2, Util.length(map)); Integer[] array = new Integer[] { 1, 2, 3, 4, 5 }; assertEquals(5, Util.length(array)); ArrayEnumeration<Integer> ae = new ArrayEnumeration<>(array); assertEquals(5, Util.length(ae)); }