@Test
public void should_update_case_when_give_item_values() throws Exception {

    ItemValuesMap itemValues = new ItemValuesMap();
    itemValues.addStringItem(CASE_ID, "existedUniqueId");
    itemValues.addNumberItem(AGE, 18);
    itemValues.addStringItem(REGISTRATION_DATE, "2016/12/25");
    Case expected = new Case();
    when(caseDao.getCaseByUniqueId("existedUniqueId")).thenReturn(expected);
    expected.setContent(new Blob(new String("").getBytes()));
    when(caseDao.update(expected)).thenReturn(expected);
    Case actual = caseService.update(itemValues, Collections.EMPTY_LIST);
    verify(caseDao, times(1)).update(actual);
    verify(casePhotoDao, times(1)).getIdsByCaseId(actual.getId());
    assertFalse("Sync status should be false", actual.isSynced());
    assertThat("Age should be 18", actual.getAge(), is(18));
    assertThat("Registration date should be 2016/12/25", actual.getRegistrationDate(), is
            (Utils.getRegisterDateByYyyyMmDd("2016/12/25")));
}