public void testWeaklyConsistentIteration(){
  final LinkedBlockingQueue q=new LinkedBlockingQueue(3);
  q.add(one);
  q.add(two);
  q.add(three);
  for (Iterator it=q.iterator(); it.hasNext(); ) {
    q.remove();
    it.next();
  }
  assertEquals(0,q.size());
}

public void testWeaklyConsistentIteration ( ) { final LinkedBlockingQueue q = new LinkedBlockingQueue ( 3 ) ; q . add ( one ) ; q . add ( two ) ; q . add ( three ) ; for ( Iterator it = q . iterator ( ) ; it . hasNext ( ) ; ) { q . remove ( ) ; it . next ( ) ; } assertEquals ( 0 , q . size ( ) ) ; }
modifications do not cause iterators to fail
