public async Task Reset()
        {
            var user     = MakeUser();
            var branches = new List <Branch>
            {
                new Branch {
                    Id = 1, Name = "branch1", Address = "address1"
                }
            };
            var cars = new List <Car>
            {
                new Car {
                    Id = 1, Model = "model1", Number = "number1"
                }
            };
            var context = MakeContenxt(
                isAuthenticated: true,
                loggedInUser: user,
                branches: branches,
                cars: cars);

            var service = new CurrentUserService(
                context.HttpContextAccessor,
                context.UsersDao,
                context.BranchesDao,
                context.CarsDao);

            Assert.True(await service.SetBranchAsync(cars.First().Id));
            Assert.True(await service.SetCarAsync(cars.First().Id));
            Assert.Same(branches.First(), await service.GetBranchAsync());
            Assert.Same(cars.First(), await service.GetCarAsync());

            service.Reset();

            Assert.Null(await service.GetBranchAsync());
            Assert.Null(await service.GetCarAsync());
        }
        public async Task UserNotLoggedIn()
        {
            var context = MakeContenxt();

            var service = new CurrentUserService(
                context.HttpContextAccessor,
                context.UsersDao,
                context.BranchesDao,
                context.CarsDao);

            Assert.False(service.IsAuthenticated);
            Assert.Null(await service.GetUserAsync());
            Assert.Null(await service.GetRoleAsync());
            Assert.Null(await service.GetBranchAsync());
            Assert.Null(await service.GetCarAsync());
        }