* @throws Exception
*/
@SuppressWarnings("nls")
@Test
public void testNoUpdateEventForDeletedChildsOfSavedParent() throws Exception {
FolderAdapter folderListener = null;
try {
IFolder root = fFactory.createFolder(null, null, "Root");
root = DynamicDAO.save(root);
IFolder folder1 = fFactory.createFolder(null, root, "Folder #1");
root = DynamicDAO.save(root);
folder1 = root.getFolders().get(0);
IFolder folder2 = fFactory.createFolder(null, root, "Folder #2");
root = DynamicDAO.save(root);
folder2 = root.getFolders().get(1);
IFeed feed = fFactory.createFeed(null, new URI("http://www.feed.com"));
fFactory.createNews(null, feed, new Date());
DynamicDAO.save(feed);
fFactory.createBookMark(null, folder1, new FeedLinkReference(feed.getLink()), "BookMark");
folder1 = DynamicDAO.save(folder1);
assertEquals(1, new FeedReference(feed.getId()).resolve().getNews().size());
folderListener = new FolderAdapter() {
@Override
public void entitiesUpdated(Set<FolderEvent> events) {
for (FolderEvent folderEvent : events) {
IFolder folder = folderEvent.getEntity();
if (folder.getName().startsWith("Folder"))