TracingPhotoService { public void deleteByTracingId(long tracingId) { tracingPhotoDao.deleteByTracingId(tracingId); } TracingPhotoService(TracingPhotoDao tracingDao); static TracingPhotoService getInstance(); TracingPhoto getFirst(long tracingId); TracingPhoto getById(long id); List<Long> getIdsByTracingId(long tracingId); boolean hasUnSynced(long tracingId); void deleteByTracingId(long tracingId); static final String TAG; }
@Test public void should_call_delete_by_tracing_id_in_tracing_photo_dao() throws Exception { tracingPhotoService.deleteByTracingId(123L); verify(tracingPhotoDao, times(1)).deleteByTracingId(123L); }