}
@Test
public void testUpdate() {
String newTitle = "Changed title";
Poll poll = PersistedObjectsFactory.createDefaultVoting();
session.save(poll);
poll.setTitle(newTitle);
pollDao.saveOrUpdate(poll);
session.flush();
session.evict(poll);
Poll changedPoll = (Poll) session.get(Poll.class, poll.getId());
Assert.assertNotNull(changedPoll);
Assert.assertEquals(newTitle, changedPoll.getTitle());
}