Lexicon implements IHasID, IHasLanguageIdentifier { public boolean addLexicalEntry(LexicalEntry lexicalEntry){ if(!this.lexicalEntries.contains(lexicalEntry)){ this.lexicalEntries.add(lexicalEntry); return true; } return false; }  List<LexicalEntry> getLexicalEntries(); void setLexicalEntries(List<LexicalEntry> lexicalEntries); List<SubcategorizationFrame> getSubcategorizationFrames(); void setSubcategorizationFrames(List<SubcategorizationFrame> subcategorizationFrames); List<SemanticPredicate> getSemanticPredicates(); void setSemanticPredicates(List<SemanticPredicate> semanticPredicates); List<Synset> getSynsets(); void setSynsets(List<Synset> synsets); List<SynSemCorrespondence> getSynSemCorrespondences(); void setSynSemCorrespondences(
			List<SynSemCorrespondence> synSemCorrespondences); List<ConstraintSet> getConstraintSets(); void setConstraintSets(List<ConstraintSet> constraintSets); String getLanguageIdentifier(); void setLanguageIdentifier(final String languageIdentifier); String getId(); void setId(String id); void setName(String name); String getName(); List<SubcategorizationFrameSet> getSubcategorizationFrameSets(); void setSubcategorizationFrameSets(List<SubcategorizationFrameSet> subcategorizationFrameSets); LexicalResource getLexicalResource(); void setLexicalResource(LexicalResource lexicalResource); boolean addLexicalEntry(LexicalEntry lexicalEntry);  }
@Test public void testAddLexicalEntry() { LexicalEntry lexicalEntry = new LexicalEntry("1"); assertTrue(lexicon.addLexicalEntry(lexicalEntry)); List<LexicalEntry> lexicalEntries = lexicon.getLexicalEntries(); assertEquals(1, lexicalEntries.size()); assertEquals(lexicalEntry, lexicalEntries.get(0)); assertFalse(lexicon.addLexicalEntry(lexicalEntry)); assertEquals(1, lexicalEntries.size()); LexicalEntry lexicalEntry2 = new LexicalEntry("2"); assertTrue(lexicon.addLexicalEntry(lexicalEntry2)); assertEquals(2, lexicalEntries.size()); assertTrue(lexicalEntries.contains(lexicalEntry)); assertTrue(lexicalEntries.contains(lexicalEntry2)); }