public void FindNotificationTemplateById_Service_Success() { // Arrange notificationTemplateService = new NotificationTemplateService(mockRepository.Object, mockLogger.Object, mockCache.Object, mockTelemetry.Object); mockRepository.Setup(x => x.FindById <NotificationTemplate>(It.IsAny <int>())).Returns(new NotificationTemplate()).Verifiable(); // Act var response = notificationTemplateService.FindNotificationTemplateById(It.IsAny <int>()); // Assert Assert.IsNotNull(response); Assert.IsNotNull(response.Result); Assert.IsInstanceOfType(response, typeof(GenericServiceResponse <NotificationTemplateDto>)); mockRepository.Verify(x => x.FindById <NotificationTemplate>(It.IsAny <int>()), Times.Once); }