public async Task When_GetSpecificationLatestSucessfulJob_has_no_jobs_Returns_Empty_Response()
        {
            _mockJobsApiClient
            .Setup(x => x.GetLatestSuccessfulJobForSpecification("ABC123", "SomeJobDefinitionId"))
            .ReturnsAsync(new ApiResponse <JobSummary>(HttpStatusCode.NotFound, null));
            _sut = new JobsController(_mockJobsApiClient.Object, Mock.Of <IMapper>());

            IActionResult result = await _sut.GetSpecificationLatestSucessfulJob("ABC123", "SomeJobDefinitionId");

            _mockJobsApiClient.VerifyAll();
            result.Should().NotBeNull();
            result.Should().BeAssignableTo <OkResult>();
            var content = (result as OkResult);

            content.Should().NotBeNull();
            content.Should().BeOfType <OkResult>();
        }
        public async Task When_GetSpecificationLatestSucessfulJob_has_Valid_SuccessfulJob_Returns_Job()
        {
            JobSummary expected = new JobSummary {
                JobId = "ABC123", RunningStatus = RunningStatus.Completed, CompletionStatus = CompletionStatus.Succeeded
            };

            _mockJobsApiClient
            .Setup(x => x.GetLatestSuccessfulJobForSpecification("ABC123", "Published"))
            .ReturnsAsync(new ApiResponse <JobSummary>(HttpStatusCode.OK, expected));
            IMapper mapper = MappingHelper.CreateFrontEndMapper();

            _sut = new JobsController(_mockJobsApiClient.Object, mapper);

            IActionResult result = await _sut.GetSpecificationLatestSucessfulJob("ABC123", "Published");

            result.Should().NotBeNull();
            result.Should().BeAssignableTo <OkObjectResult>();
            var content = (result as OkObjectResult).Value;

            content.Should().NotBeNull();
            content.Should().BeOfType <JobSummaryViewModel>();
        }