void () { int N = 10000; for (int i = 0; i < N; i++) { String toAdd = String.valueOf(i); assertTrue(myQueue.add(toAdd)); assertEquals(i+1, myQueue.size()); String toLookup = String.valueOf(i); assertNotSame(toLookup, toAdd); String found = myQueue.find(toLookup); assertSame(toAdd, found); assertTrue(myQueue.contains(toAdd)); assertTrue(myQueue.contains(toLookup)); int it=0; for (String s : myQueue) { String str = String.valueOf(it); assertEquals(str, s); assertTrue(myQueue.contains(str)); it++; } assertEquals(i+1, it); } int delta = nextPrime(N); int toRemove = 0; for (int i = 0; i < N; i++) { String str = String.valueOf(i); assertTrue(myQueue.contains(str)); boolean removed = myQueue.remove(str); assertTrue(removed); assertEquals(N-i-1, myQueue.size()); assertFalse(myQueue.contains(str)); toRemove = (toRemove + delta) % N; } }