void () { doTest(""" import java.util.*;class A<T> {{Iterator<T> i = new Iterator<>() { Enumeration<T> myEnumeration; public boolean hasNext() { return myEnumeration.hasMoreElements(); } public T next() { if (this.hasNext()) { return null; } throw new NoSuchElementException(); } public void remove() {}};}}"""); }