assertEquals(clone, new CodeListSet<LargeCodeList>(LargeCodeList.class, true));
/*
* Tests contains(Object) and remove(Object). We also remove elements
* from the master set, then we verify that the result is the same.
*/
LargeCodeList lastRemoved = null;
final Random random = new Random();
do {
for (final Iterator<LargeCodeList> it=master.iterator(); it.hasNext();) {
final LargeCodeList code = it.next();
assertTrue(code.name(), c.contains(code));
if (random.nextBoolean()) {
assertTrue (code.name(), c.remove(code));
assertFalse(code.name(), c.contains(code));
it.remove();
lastRemoved = code;
if (master.size() == 1) {
// Very unlikely, but let be safe since the tests
// after the look require at least one element.