23 |
|
} |
24 |
|
|
25 |
|
/** |
26 |
< |
* Create a queue of given size containing consecutive |
26 |
> |
* Creates a queue of given size containing consecutive |
27 |
|
* Integers 0 ... n. |
28 |
|
*/ |
29 |
|
private LinkedList<Integer> populatedQueue(int n) { |
411 |
|
q.add(new Integer(2)); |
412 |
|
q.add(new Integer(3)); |
413 |
|
Iterator it = q.iterator(); |
414 |
< |
assertEquals(it.next(), 1); |
414 |
> |
assertEquals(1, it.next()); |
415 |
|
it.remove(); |
416 |
|
it = q.iterator(); |
417 |
< |
assertEquals(it.next(), 2); |
418 |
< |
assertEquals(it.next(), 3); |
417 |
> |
assertEquals(2, it.next()); |
418 |
> |
assertEquals(3, it.next()); |
419 |
|
assertFalse(it.hasNext()); |
420 |
|
} |
421 |
|
|