@Test
public void persistReportEntities_retriesAfterDeadlockThenSucceeds() {

  AccountPerformanceReport report = generateReport(1);
  Mockito.doThrow(new LockAcquisitionException("", null))
      .doNothing()
      .when(session)
      .saveOrUpdate(any());
  sqlEntitiesPersister.persistReportEntities(Arrays.asList(report));
  sequence.verify(session, Mockito.times(2)).saveOrUpdate(report);
}