public async Task UpdateAsyncWhenIdIsCorrectReturnsStudyMaterialInstance()
        {
            // Arrange
            var mockUnitOfWork = GetDefaultUnitOfWorkRepositoryInstance();
            var mockStudyMaterialRepository = GetDefaultStudyMaterialRepositoryInstance();
            var StudyMaterialId             = 1;
            var studyMaterial = new StudyMaterial()
            {
                Id          = 1,
                Title       = "string",
                Description = "string",
                TopicId     = 1
            };

            mockStudyMaterialRepository.Setup(r => r.FindById(StudyMaterialId)).Returns(Task.FromResult(studyMaterial));
            mockStudyMaterialRepository.Setup(r => r.Update(studyMaterial));
            var service = new StudyMaterialService(mockStudyMaterialRepository.Object, mockUnitOfWork.Object);

            // Act
            StudyMaterialResponse result = await service.UpdateAsync(StudyMaterialId, studyMaterial);

            var resource = result.Resource;

            // Assert
            resource.Should().Equals(studyMaterial);
        }
        public async Task UpdateAsyncWhenInvalidIdReturnsStudyMaterialNotFoundResponse()
        {
            // Arrange
            var mockUnitOfWork = GetDefaultUnitOfWorkRepositoryInstance();
            var mockStudyMaterialRepository = GetDefaultStudyMaterialRepositoryInstance();
            var StudyMaterialId             = 1;
            var studyMaterial = new StudyMaterial()
            {
                Id          = 1,
                Title       = "string",
                Description = "string",
                TopicId     = 1
            };

            mockStudyMaterialRepository.Setup(r => r.FindById(StudyMaterialId)).Returns(Task.FromResult <StudyMaterial>(null));
            mockStudyMaterialRepository.Setup(r => r.Update(studyMaterial));
            var service = new StudyMaterialService(mockStudyMaterialRepository.Object, mockUnitOfWork.Object);

            // Act
            StudyMaterialResponse result = await service.UpdateAsync(StudyMaterialId, studyMaterial);

            var message = result.Message;

            // Assert
            message.Should().Be("Study material not found");
        }