public async Task QueueJob_Called_ReturnsJob() { string specificationId = "1234"; string jobId = "3456"; IJobsApiClient jobsApiClient = Substitute.For <IJobsApiClient>(); JobManagementResiliencePolicies policies = new JobManagementResiliencePolicies { JobsApiClient = Policy.NoOpAsync() }; IMessengerService messengerService = Substitute.For <IMessengerService>(); ILogger logger = Substitute.For <ILogger>(); Job jobApiResponse = new Job { Id = jobId }; JobCreateModel jobCreateModel = new JobCreateModel { SpecificationId = specificationId }; jobsApiClient .CreateJob(jobCreateModel) .Returns(jobApiResponse); JobManagement jobManagement = new JobManagement(jobsApiClient, logger, policies, messengerService); //Act await jobManagement.QueueJob(jobCreateModel); await jobsApiClient .Received(1) .CreateJob(jobCreateModel); }