public void testIteratorOrdering(){
  final LinkedBlockingQueue q=new LinkedBlockingQueue(3);
  q.add(one);
  q.add(two);
  q.add(three);
  assertEquals(0,q.remainingCapacity());
  int k=0;
  for (Iterator it=q.iterator(); it.hasNext(); ) {
    assertEquals(++k,it.next());
  }
  assertEquals(3,k);
}

public void testIteratorOrdering ( ) { final LinkedBlockingQueue q = new LinkedBlockingQueue ( 3 ) ; q . add ( one ) ; q . add ( two ) ; q . add ( three ) ; assertEquals ( 0 , q . remainingCapacity ( ) ) ; int k = 0 ; for ( Iterator it = q . iterator ( ) ; it . hasNext ( ) ; ) { assertEquals ( ++ k , it . next ( ) ) ; } assertEquals ( 3 , k ) ; }
iterator ordering is fifo
