@Test
public void update_TodoEntryFound_ShouldUpdateTodoEntryAndReturnUpdatedTodoEntry() {

    TodoDTO existingTodoEntry = new TodoDTOBuilder()
            .id(ID)
            .description(DESCRIPTION)
            .title(TITLE)
            .build();
    Todo updatedTodoEntry = Todo.getBuilder(TITLE)
            .creationTime(CREATION_TIME)
            .description(DESCRIPTION)
            .id(ID)
            .modificationTime(MODIFICATION_TIME)
            .build();
    when(repositoryMock.update(isA(Todo.class))).thenReturn(updatedTodoEntry);
    TodoDTO returnedTodoEntry = service.update(existingTodoEntry);
    ArgumentCaptor<Todo> repositoryMethodArgument = ArgumentCaptor.forClass(Todo.class);
    verify(repositoryMock, times(1)).update(repositoryMethodArgument.capture());
    verifyNoMoreInteractions(repositoryMock);
    Todo repositoryMethodArgumentValue = repositoryMethodArgument.getValue();
    assertThatTodo(repositoryMethodArgumentValue)
            .hasDescription(DESCRIPTION)
            .hasId(ID)
            .hasTitle(TITLE)
            .creationTimeIsNotSet()
            .modificationTimeIsNotSet();
    assertThatTodoDTO(returnedTodoEntry)
            .hasDescription(DESCRIPTION)
            .hasId(ID)
            .hasTitle(TITLE)
            .wasCreatedAt(CREATION_TIME_STRING)
            .wasModifiedAt(MODIFICATION_TIME_STRING);
}