@Test
public void should_update_incident_when_give_item_values() throws Exception {

    ItemValuesMap itemValues = new ItemValuesMap();
    itemValues.addStringItem(INCIDENT_ID, "existedUniqueId");
    itemValues.addNumberItem(AGE, 18);
    itemValues.addStringItem(DATE_OF_INTERVIEW, "2016/12/25");
    Incident expected = new Incident();
    PowerMockito.when(incidentDao.getIncidentByUniqueId("existedUniqueId")).thenReturn
            (expected);
    expected.setContent(new Blob(new String("").getBytes()));
    PowerMockito.when(incidentDao.update(expected)).thenReturn(expected);
    Incident actual = incidentService.update(itemValues);
    verify(incidentDao, times(1)).update(actual);
    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")));
}