assertEquals(0, CollectionUtils.cardinality("B", set));
assertEquals(1, CollectionUtils.cardinality("C", set));
assertEquals(0, CollectionUtils.cardinality("D", set));
assertEquals(1, CollectionUtils.cardinality("E", set));
Bag bag = new HashBag();
bag.add("A", 3);
bag.add("C");
bag.add("E");
bag.add("E");
assertEquals(3, CollectionUtils.cardinality("A", bag));
assertEquals(0, CollectionUtils.cardinality("B", bag));
assertEquals(1, CollectionUtils.cardinality("C", bag));
assertEquals(0, CollectionUtils.cardinality("D", bag));
assertEquals(2, CollectionUtils.cardinality("E", bag));