void () { assertTrue(myWeakList.isEmpty()); addElement(new Object()); assertFalse(myWeakList.isEmpty()); myHolder.clear(); gc(); assertEquals(1, myWeakList.listSize()); assertTrue(myWeakList.isEmpty()); }