# | Line 194 | Line 194 | public class CopyOnWriteArraySetTest ext | |
---|---|---|
194 | assertTrue(it.hasNext()); | |
195 | assertEquals(elements[j], it.next()); | |
196 | } | |
197 | < | assertFalse(it.hasNext()); |
198 | < | try { |
199 | < | it.next(); |
200 | < | shouldThrow(); |
201 | < | } catch (NoSuchElementException success) {} |
197 | > | assertIteratorExhausted(it); |
198 | > | } |
199 | > | |
200 | > | /** |
201 | > | * iterator of empty collection has no elements |
202 | > | */ |
203 | > | public void testEmptyIterator() { |
204 | > | assertIteratorExhausted(new CopyOnWriteArraySet().iterator()); |
205 | } | |
206 | ||
207 | /** |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |