TermsAccessor { public Iterator<Term> iterator() { return definitions.iterator(); } TermsAccessor(String inputFileName);  TermsAccessor(Reader rdr); String getIdent(); Iterator<Term> iterator();  }
@Test public final void testIterator() { final Iterator<Term> iterator = target.iterator(); int i = 0; while (iterator.hasNext()) { Term element = (Term) iterator.next(); assertEquals(terms[i], element.term); assertEquals(defns[i], element.definition); ++i; } }