public void testEntityDataProvider(){
log.info(" --- testEntityDataProvider ---");
String testName = "provider";
IndexingConfig config = new IndexingConfig(CONFIG_ROOT+File.separatorChar+testName,
CONFIG_ROOT+'/'+testName){};
EntityIterator entityIdIterator = config.getEntityIdIterator();
assertNotNull("Unable to perform test whithout EntityIterator",entityIdIterator);
if(entityIdIterator.needsInitialisation()){
entityIdIterator.initialise();
}
EntityDataProvider dataProvider = config.getEntityDataProvider();
assertNotNull(dataProvider);
assertTrue(dataProvider.needsInitialisation());//there are test data to load
dataProvider.initialise();
assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
long count = 0;
while(entityIdIterator.hasNext()){
EntityScore entityScore = entityIdIterator.next();
assertNotNull(entityScore);
assertNotNull(entityScore.id);
validateRepresentation(dataProvider.getEntityData(entityScore.id),
entityScore.id);
count++;