public async void ResolveVerification_OnNotMatchingCode_BadRequest()
        {
            //Arrange
            var resolveDto = new VerificationResolveDto
            {
                PhoneNumber      = "491736890",
                Password         = "******",
                VerificationCode = "123456"
            };

            var token = new VerificationToken {
                Expires = DateTime.MaxValue
            };

            var userManagerMock = MockHelpers.GetMockUserManager();
            var persistenceMock = new Mock <IIdentityPersistence>();

            persistenceMock
            .Setup(r => r.VerificationTokens
                   .FindByUserAsync(It.IsAny <string>()))
            .ReturnsAsync(token);

            var messageSenderMock = new Mock <ISmsSender>();
            var configurationMock = new Mock <IConfigurationService>();

            //Act
            var controller = new VerificationController(_logger, persistenceMock.Object,
                                                        messageSenderMock.Object, configurationMock.Object, userManagerMock.Object);

            var response = await controller.ResolveVerification(resolveDto);

            //Assert
            Assert.IsType <BadRequestObjectResult>(response);
        }
        public async void ResolveVerification_OnNullVerificationRequests_BadRequest()
        {
            //Arrange
            var verificationResponseDto = new VerificationResolveDto
            {
                PhoneNumber      = "491736890",
                Password         = "******",
                VerificationCode = "789-789"
            };

            var userManagerMock = MockHelpers.GetMockUserManager();
            var persistenceMock = new Mock <IIdentityPersistence>();

            persistenceMock
            .Setup(r => r.VerificationTokens
                   .FindByUserAsync(It.IsAny <string>()))
            .Returns(Task.FromResult <VerificationToken>(null));

            var messageSenderMock = new Mock <ISmsSender>();
            var configurationMock = new Mock <IConfigurationService>();

            //Act
            var controller = new VerificationController(_logger, persistenceMock.Object,
                                                        messageSenderMock.Object, configurationMock.Object, userManagerMock.Object);

            var response = await controller.ResolveVerification(verificationResponseDto);

            //Assert
            Assert.IsType <BadRequestObjectResult>(response);
        }