public final void givenEntityIsPersisted_thenException() throws IOException {
final SessionFactory sessionFactory = configureSessionFactory();
final Session session = sessionFactory.openSession();
session.beginTransaction();
session.saveOrUpdate(new Foo());
session.getTransaction().commit();
}