public async Task And_Opportunity_Doesnt_Exist_Then_Returns_NotFound(
            int opportunityId,
            [Frozen] Mock <IMediator> mockMediator,
            [Greedy] OpportunityController opportunityController)
        {
            mockMediator
            .Setup(x => x.Send(It.Is <GetContactDetailsQuery>(y => y.OpportunityId == opportunityId), It.IsAny <CancellationToken>()))
            .ReturnsAsync((GetContactDetailsResult)null);

            var controllerResult = await opportunityController.ContactDetails(opportunityId);

            var notFoundResult = controllerResult as NotFoundResult;

            Assert.IsNotNull(controllerResult);
            Assert.IsNotNull(notFoundResult);
        }
        public async Task And_Opportunity_Exists_Then_Returns_Ok_And_Pledge(
            int opportunityId,
            GetContactDetailsResult getContactDetailsResult,
            [Frozen] Mock <IMediator> mockMediator,
            [Greedy] OpportunityController opportunityController)
        {
            mockMediator
            .Setup(x => x.Send(It.Is <GetContactDetailsQuery>(y => y.OpportunityId == opportunityId), It.IsAny <CancellationToken>()))
            .ReturnsAsync(getContactDetailsResult);

            var controllerResult = await opportunityController.ContactDetails(opportunityId);

            var okObjectResult            = controllerResult as OkObjectResult;
            var getContactDetailsResponse = okObjectResult.Value as GetContactDetailsResponse;

            Assert.IsNotNull(controllerResult);
            Assert.IsNotNull(okObjectResult);
            Assert.IsNotNull(getContactDetailsResponse);
        }