void () { final Bag bag = new Bag("a", "b"); assertEquals(""" a : 1 b : 1 """, bag.toString()); bag.add("a"); assertEquals(bag.getCardinality(), 3); Bag toAdd = new Bag("a", "c"); bag.addAll(toAdd); assertEquals(""" c : 1 a : 3 b : 1 """, bag.toString()); assertEquals(bag.getCardinality(), 5); }