/* Assert Number of Entities */
List<IEntity> entities = db.query(IEntity.class);
assertEquals(entities.size(), defragmentedDb.query(IEntity.class).size());
for (IEntity entity : entities) {
Query query = defragmentedDb.query();
query.constrain(entity.getClass());
query.descend("fId").constrain(Long.valueOf(entity.getId())); //$NON-NLS-1$
List<?> result = query.execute();
assertEquals(1, result.size());
assertEquals(entity, result.get(0));