*
* @throws Exception
*/
@Test
public void testFlatFolderEvents() throws Exception {
FolderListener folderListener = null;
try {
/* Add */
final FolderReference rootFolder = new FolderReference(DynamicDAO.save(fFactory.createFolder(null, null, "Root")).getId());
IFolder folder = fFactory.createFolder(null, rootFolder.resolve(), "Folder");
final boolean folderEvents[] = new boolean[3];
final FolderReference folderReference[] = new FolderReference[1];
folderListener = new FolderListener() {
boolean updateEventOccurred = false;
public void entitiesAdded(Set<FolderEvent> events) {
for (FolderEvent event : events) {
assertTrue("Expected this Event to be Root Event", event.isRoot());