@Test public void shouldInsertReportTemplate() throws Exception { ReportRight reportRight = new ReportRight(); reportRightRepository.insert(reportRight); verify(reportRightMapper).insert(reportRight); }
public void insert(ReportRight reportRight) { try { mapper.insert(reportRight); } catch (DataIntegrityViolationException integrityViolationException) { throw new DataException("report.template.name.already.exists"); } }
ReportRightRepository { public void insert(ReportRight reportRight) { try { mapper.insert(reportRight); } catch (DataIntegrityViolationException integrityViolationException) { throw new DataException("report.template.name.already.exists"); } } }
ReportRightRepository { public void insert(ReportRight reportRight) { try { mapper.insert(reportRight); } catch (DataIntegrityViolationException integrityViolationException) { throw new DataException("report.template.name.already.exists"); } }  }
ReportRightRepository { public void insert(ReportRight reportRight) { try { mapper.insert(reportRight); } catch (DataIntegrityViolationException integrityViolationException) { throw new DataException("report.template.name.already.exists"); } }  void insert(ReportRight reportRight); }
ReportRightRepository { public void insert(ReportRight reportRight) { try { mapper.insert(reportRight); } catch (DataIntegrityViolationException integrityViolationException) { throw new DataException("report.template.name.already.exists"); } }  void insert(ReportRight reportRight);  }