public void AccessToken_IsUserLoggedIn_ShouldReturnTrue()
        {
            var userId            = Guid.NewGuid().ToString("D");
            var id                = Guid.NewGuid();
            var accessTokenString = Guid.NewGuid().ToString("D");
            var dataDevices       = new List <Device>()
            {
                new Device()
                {
                    Id     = id,
                    UserId = userId
                }
            }.AsQueryable();

            var dataAccessTokens = new List <AccessToken>()
            {
                new AccessToken()
                {
                    Device = new Device()
                    {
                        Id = id, UserId = userId
                    },
                    UniqueAccesToken = accessTokenString,
                    CreatedDateTime  = DateTime.Now
                }
            }.AsQueryable();
            var mockSetAccessTokens = new Mock <DbSet <AccessToken> >();

            mockSetAccessTokens.As <IQueryable <AccessToken> >().Setup(m => m.Provider).Returns(dataAccessTokens.Provider);
            mockSetAccessTokens.As <IQueryable <AccessToken> >().Setup(m => m.Expression).Returns(dataAccessTokens.Expression);
            mockSetAccessTokens.As <IQueryable <AccessToken> >().Setup(m => m.ElementType).Returns(dataAccessTokens.ElementType);
            mockSetAccessTokens.As <IQueryable <AccessToken> >().Setup(m => m.GetEnumerator()).Returns(dataAccessTokens.GetEnumerator());

            var mockSetDevices = new Mock <DbSet <Device> >();

            mockSetDevices.As <IQueryable <Device> >().Setup(m => m.Provider).Returns(dataDevices.Provider);
            mockSetDevices.As <IQueryable <Device> >().Setup(m => m.Expression).Returns(dataDevices.Expression);
            mockSetDevices.As <IQueryable <Device> >().Setup(m => m.ElementType).Returns(dataDevices.ElementType);
            mockSetDevices.As <IQueryable <Device> >().Setup(m => m.GetEnumerator()).Returns(dataDevices.GetEnumerator());

            var mockContext = new Mock <Models.Models.Database>();

            mockContext.Setup(c => c.AccessTokens).Returns(mockSetAccessTokens.Object);
            mockContext.Setup(c => c.Devices).Returns(mockSetDevices.Object);

            AccessTokenService accTokService = new AccessTokenService(mockContext.Object);

            Assert.AreEqual(true, accTokService.IsUserLoggedIn(accessTokenString));
        }