DynamicDAO.save(feed);
Owl.getModelFactory().createBookMark(null, childFolder, new FeedLinkReference(feed.getLink()), "Mark");
folder = DynamicDAO.save(folder);
FolderNewsMark mark = new FolderNewsMark(childFolder);
assertEquals(childFolder.getId(), mark.getId());
assertEquals(childFolder, mark.getFolder());
assertEquals("bar", mark.getProperty("foo"));
assertTrue(Long.valueOf(mark.toReference().getId()).equals(childFolder.getId()));
assertEquals(2, mark.getNews().size());
assertEquals(2, mark.getNews(EnumSet.of(INews.State.NEW, INews.State.READ)).size());
assertEquals(1, mark.getNews(EnumSet.of(INews.State.NEW)).size());
assertEquals(1, mark.getNews(EnumSet.of(INews.State.READ)).size());
assertEquals(2, mark.getNewsCount(EnumSet.of(INews.State.NEW, INews.State.READ)));
assertEquals(1, mark.getNewsCount(EnumSet.of(INews.State.NEW)));
assertEquals(1, mark.getNewsCount(EnumSet.of(INews.State.READ)));
}