WikipediaArticleResource extends AbstractResource { public Iterable<Entity> getEntities() throws LexicalSemanticResourceException { return new WikipediaArticleEntityIterable(wiki, isCaseSensitive); } WikipediaArticleResource(String host, String database, String user, String password, Language language);  WikipediaArticleResource(DatabaseConfiguration dbConfig);  WikipediaArticleResource(Wikipedia wiki); boolean containsEntity(Entity entity); boolean containsLexeme(String lexeme); Set<Entity> getEntity(String lexeme); Set<Entity> getEntity(String lexeme, PoS pos); Set<Entity> getEntity(String lexeme, PoS pos, String sense); Set<Entity> getParents(Entity entity); int getNumberOfEntities(); Iterable<Entity> getEntities(); Set<Entity> getChildren(Entity entity); String getResourceName(); String getResourceVersion(); Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); int getShortestPathLength(Entity e1, Entity e2); String getGloss(Entity entity); Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos);  }
@Test public void testGetEntities() throws LexicalSemanticResourceException { int i = 0; int j = 0; wikiResource.setIsCaseSensitive(false); for (Entity entity : wikiResource.getEntities()) { assertTrue(entity.toString(), wikiResource.containsEntity(entity)); i++; } wikiResource.setIsCaseSensitive(true); for (Entity entity : wikiResource.getEntities()) { assertTrue(entity.toString(), wikiResource.containsEntity(entity)); j++; } assertEquals(i, j); }