public When_Qualification_Add_Qualification_Does_Not_Exist() { var providerVenueService = Substitute.For <IProviderVenueService>(); _qualificationService = Substitute.For <IQualificationService>(); _qualificationService.IsValidLarIdAsync("12345678").Returns(true); _qualificationService.GetQualificationAsync("12345678").ReturnsNull(); _qualificationService.IsValidOfqualLarIdAsync("12345678").Returns(true); _providerQualificationService = Substitute.For <IProviderQualificationService>(); var routePathService = Substitute.For <IRoutePathService>(); var qualificationController = new QualificationController(providerVenueService, _qualificationService, _providerQualificationService, routePathService); var controllerWithClaims = new ClaimsBuilder <QualificationController>(qualificationController) .AddUserName("username") .AddEmail("*****@*****.**") .Build(); var viewModel = new AddQualificationViewModel { ProviderVenueId = 1, LarId = "12345678", Postcode = "CV1 2WT" }; _result = controllerWithClaims.CreateQualificationAsync(viewModel).GetAwaiter().GetResult(); }