public static Map getCardinalityMap(final Collection coll) {
        Map count = new HashMap(coll.size());
        for (Iterator it = coll.iterator(); it.hasNext(); ) {
            Object obj = it.next();
            Integer c = (Integer) (count.get(obj));
            if (c == null) {
                count.put(obj, INTEGER_ONE);
            } else {
                count.put(obj, c + 1);
            }
        }
        return count;
    }
@Test
    void testGetCardinalityMap() {
        List<String> list1 = Arrays.asList("2", "2", "3");
        Map<String, Integer> map1 = CollectionUtils.getCardinalityMap(list1);
        assertEquals(2, map1.size());
        assertEquals(2, map1.get("2").intValue());
        assertEquals(1, map1.get("3").intValue());
        
    }