public void PasswordShouldValidateBeforeExpiry()
        {
            var otp = new OneTimePassword(this.userId, "testPassword");
            passwordStoreMoq.Setup(x => x.Read(this.userId)).Returns(otp);

            var oneTimePasswordService = new OneTimePasswordService(this.passwordStoreMoq.Object, this.configurationMoq.Object);
            var password = oneTimePasswordService.Generate(userId);
            if (!oneTimePasswordService.Validate(this.userId, otp.Password)) Assert.Fail("Password should have validated.");
        }
        public void PasswordShouldFailValidationAfterExpiryTime()
        {
            var oneTimePasswordService = new OneTimePasswordService(this.passwordStoreMoq.Object, this.configurationMoq.Object);

            var password = oneTimePasswordService.Generate(userId);
            Thread.Sleep((expiryInSeconds + 1) * 1000);

            if (oneTimePasswordService.Validate(this.userId, password)) Assert.Fail("Password should have expired.");
        }