void () { addElement(new Object()); addElement(new Object()); Iterator<Object> iterator = myWeakList.iterator(); iterator.next(); assertTrue(iterator.hasNext()); iterator.next(); assertFalse(iterator.hasNext()); iterator.remove(); }