TracingPhotoService { public List<Long> getIdsByTracingId(long tracingId) { return tracingPhotoDao.getIdsByTracingId(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_get_ids_by_tracing_id_of_tracing_photo_dao() throws Exception { when(tracingPhotoDao.getIdsByTracingId(anyLong())).thenReturn(Collections.EMPTY_LIST); tracingPhotoService.getIdsByTracingId(123L); verify(tracingPhotoDao, times(1)).getIdsByTracingId(123L); }