TracingService extends RecordService { public Tracing getByInternalId(String id) { return tracingDao.getByInternalId(id); } TracingService(TracingDao tracingDao, TracingPhotoDao tracingPhotoDao); Tracing getById(long tracingId); Tracing getByUniqueId(String uniqueId); List<Tracing> getAll(); List<Long> getAllOrderByDateASC(); List<Long> getAllOrderByDateDES(); List<Long> getSearchResult(String uniqueId, String name, int ageFrom, int ageTo, Date
            date); Tracing saveOrUpdate(ItemValuesMap itemValues, List<String> photoPaths); Tracing save(ItemValuesMap itemValues, List<String> photoPaths); Tracing update(ItemValuesMap itemValues,
                          List<String> photoBitPaths); Tracing deleteByRecordId(long recordId); Tracing getByInternalId(String id); boolean hasSameRev(String id, String rev); List<Long> getAllSyncedRecordsId(); static final String TAG; static final String TRACING_DISPLAY_ID; static final String TRACING_ID; static final String TRACING_PRIMARY_ID; }
@Test public void should_get_tracing_by_internal_id() throws Exception { Tracing tracing = new Tracing(); when(tracingDao.getByInternalId(anyString())).thenReturn(tracing); assertThat("Should get tracing", tracingService.getByInternalId(""), is(tracing)); verify(tracingDao, times(1)).getByInternalId(""); }