}
@Test
public void test() {
HibernateSessionManager sessionManager = tester.getService(HibernateSessionManager.class);
Session session = sessionManager.getSession();
final Blog blog = new Blog();
blog.setName("Tapestry 5 Blog");
blog.setDescription("Thoughts on coding, technology and occasional stuff");
sessionManager.getSession().save(blog);
Article article = new Article();
article.setBlog(blog);
article.setTitle("Hello world!");
article.setContent("Hello world!");
article.setPublishDate(new GregorianCalendar(2011, 0, 28).getTime());
session.save(article);
sessionManager.commit();
Document document = tester.renderPage(SidebarBlocksDemo.class.getSimpleName());
String markup = document.toString();