35 


36 
/** 
/** 
37 
* Returns a new deque of given size containing consecutive 
* Returns a new deque of given size containing consecutive 
38 
* Integers 0 ... n. 
* Integers 0 ... n  1. 
39 
*/ 
*/ 
40 
private ArrayDeque<Integer> populatedDeque(int n) { 
private ArrayDeque<Integer> populatedDeque(int n) { 
41 
ArrayDeque<Integer> q = new ArrayDeque<Integer>(); 
ArrayDeque<Integer> q = new ArrayDeque<Integer>(); 
44 
assertTrue(q.offerLast(new Integer(i))); 
assertTrue(q.offerLast(new Integer(i))); 
45 
assertFalse(q.isEmpty()); 
assertFalse(q.isEmpty()); 
46 
assertEquals(n, q.size()); 
assertEquals(n, q.size()); 
47 

assertEquals((Integer) 0, q.peekFirst()); 
48 

assertEquals((Integer) (n  1), q.peekLast()); 
49 
return q; 
return q; 
50 
} 
} 
51 

