public void Then_If_Error_A_HttpContextException_Is_Thrown(
            PostAuthenticateUserResult apiResponse,
            AuthenticateUserCommand command,
            [Frozen] Mock <IApimDeveloperApiClient <ApimDeveloperApiConfiguration> > apimDeveloperApiClient,
            AuthenticateUserCommandHandler handler)
        {
            apimDeveloperApiClient.Setup(x =>
                                         x.PostWithResponseCode <PostAuthenticateUserResult>(It.Is <PostAuthenticateUserRequest>(c =>
                                                                                                                                 ((PostAuthenticateUserRequestData)c.Data).Email.Equals(command.Email) &&
                                                                                                                                 ((PostAuthenticateUserRequestData)c.Data).Password.Equals(command.Password))))
            .ReturnsAsync(new ApiResponse <PostAuthenticateUserResult>(apiResponse, HttpStatusCode.BadRequest, "An Error"));

            Assert.ThrowsAsync <HttpRequestContentException>(() => handler.Handle(command, CancellationToken.None));
        }
        public async Task Then_The_Query_Is_Handled_And_User_Returned(
            PostAuthenticateUserResult apiResponse,
            AuthenticateUserCommand command,
            [Frozen] Mock <IApimDeveloperApiClient <ApimDeveloperApiConfiguration> > apimDeveloperApiClient,
            AuthenticateUserCommandHandler handler)
        {
            apimDeveloperApiClient.Setup(x =>
                                         x.PostWithResponseCode <PostAuthenticateUserResult>(It.Is <PostAuthenticateUserRequest>(c =>
                                                                                                                                 ((PostAuthenticateUserRequestData)c.Data).Email.Equals(command.Email) &&
                                                                                                                                 ((PostAuthenticateUserRequestData)c.Data).Password.Equals(command.Password))))
            .ReturnsAsync(new ApiResponse <PostAuthenticateUserResult>(apiResponse, HttpStatusCode.OK, ""));

            var actual = await handler.Handle(command, CancellationToken.None);

            actual.User.Should().BeEquivalentTo(apiResponse);
        }