public async Task CreateAnswerAsync_ValidQuestionIdPassed_ReturnsCreatedAtRouteResult()
        {
            var user = new ClaimsPrincipal(new ClaimsIdentity(new Claim[]
            {
                new Claim(ClaimTypes.NameIdentifier, "1"),
            }));
            var exam = new Exam()
            {
                AuthorId = 1
            };

            var question = new Question()
            {
                Exam = exam
            };
            var mapperMock     = new Mock <IMapper>();
            var repositoryMock = new Mock <IRepositoryWrapper>();

            repositoryMock.Setup(r => r.QuestionRepository.GetQuestionAsync(It.IsAny <int>())).ReturnsAsync(question);
            repositoryMock.Setup(r => r.AnswerRepository.Add(It.IsAny <Answer>()));
            repositoryMock.Setup(r => r.SaveAllAsync()).ReturnsAsync(true);
            mapperMock.Setup(m => m.Map <Answer>(It.IsAny <AnswerForCreationDto>())).Returns(new Answer());
            mapperMock.Setup(m => m.Map <AnswerForReturnDto>(It.IsAny <Answer>())).Returns(new AnswerForReturnDto());

            var controllerMock = new AnswersController(repositoryMock.Object, mapperMock.Object);

            controllerMock.ControllerContext = new ControllerContext()
            {
                HttpContext = new DefaultHttpContext()
                {
                    User = user
                }
            };
            var result = await controllerMock.CreateAnswerAsync(1, new AnswerForCreationDto());

            Assert.IsType <CreatedAtRouteResult>(result);
        }