CasePhotoService { public void deleteByCaseId(long caseId) { casePhotoDao.deleteByCaseId(caseId); } CasePhotoService(CasePhotoDao caseDao); static CasePhotoService getInstance(); CasePhoto getFirst(long caseId); CasePhoto getById(long id); List<Long> getIdsByCaseId(long caseId); boolean hasUnSynced(long caseId); void deleteByCaseId(long caseId); static final String TAG; }
@Test public void should_call_delete_by_case_id_in_case_photo_dao() throws Exception { casePhotoService.deleteByCaseId(123L); verify(casePhotoDao, times(1)).deleteByCaseId(123L); }