DynamicDAO.save(feed);
IFolder folder = fFactory.createFolder(null, null, "Root");
IBookMark bookmark = fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "Bookmark");
INewsBin bin = fFactory.createNewsBin(null, folder, "Bin");
DynamicDAO.save(folder);
INews copiedNews = fFactory.createNews(news, bin);
DynamicDAO.save(copiedNews);
DynamicDAO.save(bin);
UndoStack.getInstance().addOperation(new MoveOperation(Collections.singletonList(news), Collections.singletonList(copiedNews), false));
/* Remove (it's a move!) */
DynamicDAO.getDAO(INewsDAO.class).setState(Collections.singletonList(news), INews.State.HIDDEN, false, false);
assertTrue(bin.containsNews(copiedNews));
assertTrue(bookmark.getNewsCount(INews.State.getVisible()) == 0);
UndoStack.getInstance().undo();
assertTrue(bin.getNewsCount(INews.State.getVisible()) == 0);
assertTrue(bookmark.containsNews(news));
assertTrue(bookmark.getNewsCount(INews.State.getVisible()) > 0);
UndoStack.getInstance().redo();
assertTrue(bin.containsNews(copiedNews));
assertTrue(bookmark.getNewsCount(INews.State.getVisible()) == 0);
}