try{
for (int i = 1; i < this.count; i++) {
ReferenceCounter<StorageQuery> innerQuery = this.controller
.getStorageQuery();
BaseEntry e = innerQuery.get().singleEntryQuery("" + i, feedId,
this.configurator);
assertNotNull(e);
assertEquals("get entry for id" + i, "" + i, e.getId());
}
}finally{
/*
* if an exception occures the tread can at least finnish running before the
* controller will be closed in the tearDown method
*/
b.join();
}
ReferenceCounter<StorageQuery> query = this.controller
.getStorageQuery();
this.count += 10;
for (int i = 1; i < this.count; i++) {
BaseEntry e = query.get().singleEntryQuery("" + i, feedId,
this.configurator);
assertEquals("get entry for id" + i, "" + i, e.getId());
}
BaseEntry e = query.get().singleEntryQuery("" + this.count, feedId,
this.configurator);
assertNull("not entry for ID", e);
query.decrementRef();
}