public void AddLinks(TaskUsersInquiryResponse inquiryResponse)
        {
            var taskDetailLink = _taskLinkService.GetSelfLink(inquiryResponse.TaskId);
            taskDetailLink.Rel = "Task";
            inquiryResponse.AddLink(taskDetailLink);

            inquiryResponse.Users.ForEach(x => _userLinkService.AddSelfLink(x));
        }
        public TaskUsersInquiryResponse GetTaskUsers(long taskId)
        {
            var taskEntity = _queryProcessor.GetTask(taskId);
            if (taskEntity == null)
            {
                throw new RootObjectNotFoundException("Task not found.");
            }

            var task = _autoMapper.Map<Task>(taskEntity);

            var inquiryResponse = new TaskUsersInquiryResponse {TaskId = taskId, Users = task.Assignees};

            _taskUsersLinkService.AddLinks(inquiryResponse);

            return inquiryResponse;
        }