assertNull(blogEntry2);
assertTrue(view instanceof NotFoundView);
}
public void testUnpublishedViewBlogEntryAsUserThatIsAuthorisedForBlog() throws Exception {
BlogEntry blogEntry1 = new BlogEntry(blog);
blogEntry1.setPublished(false);
BlogService service = new BlogService();
service.putBlogEntry(blogEntry1);
SecurityUtils.runAsBlogContributor();
request.setParameter("entry", blogEntry1.getId());
View view = action.process(request, response);
BlogEntry blogEntry2 = (BlogEntry)action.getModel().get(Constants.BLOG_ENTRY_KEY);
assertEquals(blogEntry1.getId(), blogEntry2.getId());
assertTrue(view instanceof BlogEntryView);
}