public async Task TestRecordSurvey(RecordSurveyModel survey) { var mockSender = new Mock <ISurveySender>(MockBehavior.Loose); var mockLogger = new Mock <ILogger <SurveyController> >(MockBehavior.Loose); var mockRepo = new Mock <ISurveyRepository>(MockBehavior.Loose); var controller = new SurveyController(mockRepo.Object, mockLogger.Object, mockSender.Object); var actual = await controller.RecorddSurvey(survey).ConfigureAwait(false); Assert.NotNull(actual); }