@Test
public void should_update_tracing_when_give_item_values() throws Exception {

    String uniqueId = "tracing";
    ItemValuesMap itemValues = new ItemValuesMap();
    itemValues.addStringItem(TRACING_ID, uniqueId);
    itemValues.addStringItem(RELATION_AGE, "18");
    itemValues.addStringItem(CAREGIVER_NAME, "100");
    itemValues.addStringItem(INQUIRY_DATE, "25/12/2016");
    List<String> photoBitPaths = Collections.EMPTY_LIST;
    User user = new User("userName");
    when(PrimeroAppConfiguration.getCurrentUser()).thenReturn(user);
    Tracing tracing = new Tracing();
    when(tracingDao.getTracingByUniqueId(anyString())).thenReturn(tracing);
    tracing.setUniqueId(uniqueId);
    Tracing tracingTemp = new Tracing();
    when(tracingDao.update(any(Tracing.class))).thenReturn(tracingTemp);
    Tracing expected = new Tracing();
    when(tracingPhotoDao.update(tracingTemp, photoBitPaths)).thenReturn(expected);
    tracingService.update(itemValues, photoBitPaths);
    verify(tracingDao, times(1)).update(any(Tracing.class));
    verify(tracingPhotoDao, times(1)).update(any(Tracing.class), anyList());
}