LexicalResource { public boolean addLexicon(Lexicon lexicon){ if(!this.lexicons.contains(lexicon)){ this.lexicons.add(lexicon); return true; } return false; }  String getName(); void setName(String name); GlobalInformation getGlobalInformation(); void setGlobalInformation(GlobalInformation globalInformation); List<Lexicon> getLexicons(); void setLexicons(List<Lexicon> lexicons); List<PredicateArgumentAxis> getPredicateArgumentAxes(); void setPredicateArgumentAxes(List<PredicateArgumentAxis> predicateArgumentAxes); List<SenseAxis> getSenseAxes(); void setSenseAxes(List<SenseAxis> senseAxes); String getDtdVersion(); void setDtdVersion(String dtdVersion); List<MetaData> getMetaData(); void setMetaData(List<MetaData> metaData); boolean addLexicon(Lexicon lexicon);  }
@Test public void testAddLexicon() { Lexicon lexicon = new Lexicon(); assertTrue(lexicalResource.addLexicon(lexicon)); List<Lexicon> lexicons = lexicalResource.getLexicons(); assertEquals(1, lexicons.size()); assertEquals(lexicon, lexicons.get(0)); assertFalse(lexicalResource.addLexicon(lexicon)); assertEquals(1, lexicons.size()); Lexicon lexicon2 = new Lexicon(); assertTrue(lexicalResource.addLexicon(lexicon2)); assertEquals(2, lexicons.size()); assertTrue(lexicons.contains(lexicon)); assertTrue(lexicons.contains(lexicon2)); }