public When_EmployerService_Is_Called_To_Get_Opportunity_Employer_Owner_Null() { var employerRepository = Substitute.For <IRepository <Domain.Models.Employer> >(); _opportunityRepository = Substitute.For <IOpportunityRepository>(); _opportunityRepository.GetFirstOrDefaultAsync(Arg.Any <Expression <Func <Domain.Models.Opportunity, bool> > >()) .Returns((Domain.Models.Opportunity)null); var employerService = new EmployerService(employerRepository, _opportunityRepository, Substitute.For <IMapper>(), Substitute.For <IValidator <CrmEmployerEventBase> >(), Substitute.For <IMessageQueueService>()); _result = employerService.GetEmployerOpportunityOwnerAsync(new Guid("11111111-1111-1111-1111-111111111111")).GetAwaiter().GetResult(); }