/**
* Returns a new queue of given size containing consecutive
* Integers 0 ... n.
*/
private BlockingQueue populatedQueue(int n) {
BlockingQueue q = new LocalConcurrentBlockingObjectQueue(n);
assertTrue(q.isEmpty());
for (int i = 0; i < n; i++)
assertTrue(q.offer(new Integer(i)));
assertFalse(q.isEmpty());
assertEquals(0, q.remainingCapacity());
assertEquals(n, q.size());
return q;
}