### Question:
IndexWord extends BaseDictionaryElement { public String toString() { return ResourceBundleSet.insertParams("[IndexWord: [Lemma: {0}] {1}]", new Object[]{getLemma(), getPOS()}); } protected  IndexWord(Dictionary dictionary, String lemma, POS pos);  IndexWord(Dictionary dictionary, String lemma, POS pos, Synset synset);  IndexWord(Dictionary dictionary, String lemma, POS pos, long[] synsetOffsets); DictionaryElementType getType(); Object getKey(); POS getPOS(); boolean equals(Object object); int hashCode(); String toString(); String getLemma(); long[] getSynsetOffsets(); List<Synset> getSenses(); int sortSenses();  }### Answer:
@Test public void testConstructor() throws JWNLException { dictionary.edit(); IndexWord iw = new IndexWord(dictionary, "test", POS.NOUN); List<IndexWord> indexWords = new ArrayList<IndexWord>(1); Iterator<IndexWord> i = dictionary.getIndexWordIterator(POS.NOUN); while (i.hasNext()) { indexWords.add(i.next()); } Assert.assertEquals(1, indexWords.size()); Assert.assertEquals(iw, indexWords.get(0)); Assert.assertNotNull(iw.toString()); }