@Test
public void persistReportEntities_abortsOnSqlException() {

  Mockito.doThrow(new HibernateException("")).when(session).saveOrUpdate(any());
  try {
    sqlEntitiesPersister.persistReportEntities(Arrays.asList(generateReport(1)));
    fail();
  } catch (HibernateException ex) {
    // expected
  }
}