Code example for Multiset

Methods: add

0
        // verify uniqueness 
        assertEquals(2 * N, counts.elementSet().size());
    } 
 
    private void checkUUID(Multiset<String> counts, String uuid) {
        counts.add(uuid);
        Matcher m = uuidFormat.matcher(uuid);
        assertTrue(m.matches());
        assertEquals("4", m.group(1).substring(0, 1));
        assertTrue(m.group(2).matches("[89ab].*"));
    } 
}