public async Task HasPermissionForCard_BoardUserExists_ReturnOutputOfIBoardUserPermissionService()
        {
            var userId = "user-id";

            _currentUser.Setup(u => u.UserId).Returns(userId);
            _boardUserPermissionService.Setup(s => s.HasPermission(It.IsAny <BoardUser>(), It.IsAny <BoardUserPermission>())).Returns(true);

            var dbName = $"{nameof(CurrentUserPermissionServiceTests)}_{nameof(HasPermissionForCard_BoardUserExists_ReturnOutputOfIBoardUserPermissionService)}";

            using var context = TestApplicationDbContext.Create(dbName);
            var cancellationToken = new CancellationToken();
            var boardFactory      = new BoardFactory();
            var board             = boardFactory.Create("board-title");
            var card      = Card.Create("card-title");
            var boardUser = new BoardUserFactory().CreateOwner(1, userId);

            board.AddCard(card);
            context.Boards.Add(board);
            context.BoardUsers.Add(boardUser);
            await context.SaveChangesAsync(cancellationToken);

            var service = new CurrentUserPermissionService(context, _currentUser.Object, _boardUserPermissionService.Object);

            var result = await service.HasPermissionForCard(card.Id, BoardUserPermission.CAN_VIEW_CARD, cancellationToken);

            Assert.True(result);
        }
        public async Task HasPermissionForCard_CardNotExists_ThrowNotFoundApplicationException()
        {
            var dbName  = $"{nameof(CurrentUserPermissionServiceTests)}_{nameof(HasPermissionForCard_CardNotExists_ThrowNotFoundApplicationException)}";
            var context = TestApplicationDbContext.Create(dbName);
            var service = new CurrentUserPermissionService(context, _currentUser.Object, _boardUserPermissionService.Object);

            Task action() => service.HasPermissionForCard(1, BoardUserPermission.CAN_VIEW_CARD, new CancellationToken());

            await Assert.ThrowsAsync <NotFoundApplicationException>(action);
        }