entry.setTitle("My Title");
entry.setAuthor("author");
entry.setBody("body");
entry.setDate(new Date(1000));
Category category = new Category("categoryId", "category");
category.setBlog(blog);
entry.setCategories(Collections.singleton(category));
model.put(Constants.BLOG_KEY, blog);
model.put(Constants.BLOG_ENTRIES, Collections.singleton(entry));
SyndFeed feed = feedView.getFeed();
MockHttpServletResponse response = new MockHttpServletResponse();
response.setWriter(new PrintWriter(System.out));
feedView.dispatch(new MockHttpServletRequest(), response, null);
assertEquals("tag:www.yourdomain.com,0000-00-00:default", feed.getUri());
assertEquals("My blog", feed.getTitle());
assertEquals(1, feed.getEntries().size());
SyndEntry feedEntry = (SyndEntry) feed.getEntries().get(0);
assertEquals("tag:www.yourdomain.com,1970-01-01:default/1000", feedEntry.getUri());
assertEquals(new Date(1000), feedEntry.getPublishedDate());
assertEquals("body", ((SyndContent)feedEntry.getContents().get(0)).getValue());
assertEquals("My Title", feedEntry.getTitle());
assertEquals(entry.getPermalink(), feedEntry.getLink());
assertEquals(1, feedEntry.getCategories().size());
SyndCategory syndCategory = (SyndCategory) feedEntry.getCategories().get(0);
assertEquals("category", syndCategory.getName());
assertEquals(category.getPermalink(), syndCategory.getTaxonomyUri());
}