public async Task Then_If_Error_Then_Internal_Server_Error_Response(
            string accountType,
            string accountIdentifier,
            [Frozen] Mock <IMediator> mediator,
            [Greedy] SubscriptionsController controller)
        {
            mediator.Setup(x => x.Send(It.IsAny <GetApiProductSubscriptionsQuery>(),
                                       CancellationToken.None)).ThrowsAsync(new Exception());

            var actual = await controller.GetAvailableProducts(accountIdentifier, accountType) as StatusCodeResult;

            Assert.IsNotNull(actual);
            actual.StatusCode.Should().Be((int)HttpStatusCode.InternalServerError);
        }
        public async Task Then_The_Request_Is_Handled_And_Data_Returned(
            string accountType,
            string accountIdentifier,
            GetApiProductSubscriptionsQueryResult mediatorResult,
            [Frozen] Mock <IMediator> mediator,
            [Greedy] SubscriptionsController controller)
        {
            mediator.Setup(x => x.Send(It.Is <GetApiProductSubscriptionsQuery>(c =>
                                                                               c.AccountType.Equals(accountType) &&
                                                                               c.AccountIdentifier.Equals(accountIdentifier)
                                                                               ),
                                       CancellationToken.None)).ReturnsAsync(mediatorResult);

            var actual = await controller.GetAvailableProducts(accountIdentifier, accountType) as OkObjectResult;

            Assert.IsNotNull(actual);
            var actualModel = actual.Value as ProductSubscriptionsApiResponse;

            Assert.IsNotNull(actualModel);
        }