}
};
fModel.addPersonListener(personListener);
/* Check Category Deleted */
final ICategory category1 = fFactory.createCategory(null, newsRef1.resolve());
final CategoryReference categoryRef1 = new CategoryReference(fDao.saveCategory(category1).getId());
final ICategory category2 = fFactory.createCategory(null, newsRef2.resolve());
final CategoryReference categoryRef2 = new CategoryReference(fDao.saveCategory(category2).getId());
final boolean categoryDeleted[] = new boolean[2];
categoryListener = new CategoryAdapter() {
@Override
public void categoryDeleted(Set<CategoryEvent> events) {
for (CategoryEvent event : events) {
assertFalse("Expected this Event to be no Root Event", event.isRoot());
ICategory category = event.getEntity();
if (categoryRef1.references(category))
categoryDeleted[0] = true;
else if (categoryRef2.references(category))