@Test
public void update_TodoEntryFound_ShouldReturnUpdatedTodoEntryAsJsonDocument() throws Exception {

    TodoDTO updatedTodoEntry = new TodoDTOBuilder()
            .description(DESCRIPTION)
            .title(TITLE)
            .build();
    TodoDTO returnedTodoEntry = new TodoDTOBuilder()
            .creationTime(CREATION_TIME)
            .description(DESCRIPTION)
            .id(ID)
            .modificationTime(MODIFICATION_TIME)
            .title(TITLE)
            .build();
    when(todoCrudServiceMock.update(isA(TodoDTO.class))).thenReturn(returnedTodoEntry);
    mockMvc.perform(put("/api/todo/{id}", ID)
                    .contentType(WebTestConstants.APPLICATION_JSON_UTF8)
                    .content(objectMapper.writeValueAsBytes(updatedTodoEntry))
    )
            .andExpect(status().isOk())
            .andExpect(content().contentType(WebTestConstants.APPLICATION_JSON_UTF8))
            .andExpect(jsonPath("$.id", is(ID.intValue())))
            .andExpect(jsonPath("$.creationTime", is(CREATION_TIME)))
            .andExpect(jsonPath("$.description", is(DESCRIPTION)))
            .andExpect(jsonPath("$.modificationTime", is(MODIFICATION_TIME)))
            .andExpect(jsonPath("$.title", is(TITLE)));
    ArgumentCaptor<TodoDTO> serviceMethodArgument = ArgumentCaptor.forClass(TodoDTO.class);
    verify(todoCrudServiceMock, times(1)).update(serviceMethodArgument.capture());
    verifyNoMoreInteractions(todoCrudServiceMock);
    verifyZeroInteractions(todoSearchServiceMock);
    TodoDTO serviceMethodArgumentValue = serviceMethodArgument.getValue();
    assertThatTodoDTO(serviceMethodArgumentValue)
            .hasId(ID)
            .hasNoCreationTime()
            .hasDescription(DESCRIPTION)
            .hasNoModificationTime()
            .hasTitle(TITLE);
}