public async Task CheckSendingMessageSenderClientAsync()
        {
            ApplicationDbContext db = GetDb();

            var chatGroupRepository      = new EfDeletableEntityRepository <ChatGroup>(db);
            var repository               = new EfDeletableEntityRepository <ChatMessage>(db);
            var userChatGroupsRepository = new EfDeletableEntityRepository <UserChatGroup>(db);

            var service = new ChatsService(
                repository,
                chatGroupRepository,
                userChatGroupsRepository);

            var currentSender = new ApplicationUser()
            {
                Id       = "20",
                UserName = "******",
            };

            var currentReceiver = new ApplicationUser()
            {
                Id       = "21",
                UserName = "******",
            };

            await service.CreateUsersGroupAsync(currentSender, currentReceiver, "chat name");

            await service.SendMessageAsync("message content", currentSender, currentReceiver, "chat name");

            var message = await repository.All().FirstOrDefaultAsync();

            Assert.NotNull(repository);
            Assert.True(message.WaitingForAnswerFromAdmin);
        }
        public async Task CheckSendingMessageSenderAdminAsync()
        {
            ApplicationDbContext db = GetDb();

            var chatGroupRepository      = new EfDeletableEntityRepository <ChatGroup>(db);
            var repository               = new EfDeletableEntityRepository <ChatMessage>(db);
            var userChatGroupsRepository = new EfDeletableEntityRepository <UserChatGroup>(db);

            var service = new ChatsService(
                repository,
                chatGroupRepository,
                userChatGroupsRepository);

            var currentSender = new ApplicationUser()
            {
                Id       = "20",
                UserName = "******",
            };

            var currentReceiver = new ApplicationUser()
            {
                Id       = "21",
                UserName = "******",
            };

            await service.CreateUsersGroupAsync(this.sender, this.receiver, "chat name");

            var groupId = await service.GetGroupIdAsync("chat name");

            var chatMessage = new ChatMessage()
            {
                Id          = Guid.NewGuid().ToString(),
                Receiver    = currentReceiver,
                Sender      = currentSender,
                ChatGroupId = groupId,
            };

            await repository.AddAsync(chatMessage);

            await repository.SaveChangesAsync();

            await service.CreateUsersGroupAsync(currentSender, currentReceiver, "chat name");

            await service.SendMessageAsync("message content", currentReceiver, currentSender, "chat name");

            var message = await repository.All().FirstOrDefaultAsync();

            Assert.NotNull(repository);
            Assert.True(!message.WaitingForAnswerFromAdmin);
        }