public async Task Process_ShouldReturn200StatusCode_WhenPaymentIsSuccessfullyProcessed()
        {
            await StubAdminClient.ResetRequestsAsync();

            var response = await paymentClient.Process(new Payment
            {
                CardNumber  = "1234-1234-1234-1234",
                Amount      = 1000m,
                Currency    = "GBP",
                Cvv         = "123",
                ExpiryMonth = "Dec",
                ExpiryYear  = "2022"
            });

            var result       = (await response.EnsureSuccessStatusCodeAsync()).Content;
            var requestsMade = await StubAdminClient.GetRequestsAsync();

            result.ShouldNotBeNull();
            result.TransactionId.ShouldNotBeNull();
            result.Status.ShouldNotBeNull();
            result.Reason.ShouldBeNull();

            requestsMade
            .Count(x => x.Request.AbsolutePath == "/payment" && x.Response.StatusCode.Equals(200L))
            .ShouldBe(1);
        }
        public async Task MakingTwoApiRequests_GetsTokenOnlyOnce_WhenTokenIsNotExpired()
        {
            await StubAdminClient.PutMappingAsync(Guid.Parse("425db3ef-06ca-4a69-b5c9-a9384cabc34e"), GetAuthMapping());

            await StubAdminClient.ResetRequestsAsync();

            await bankClient.Payment.Process(payment);

            var requestsMade = await StubAdminClient.GetRequestsAsync();

            requestsMade.Count(r => r.Request.AbsolutePath == TokenPath && r.Response.StatusCode.Equals(200L))
            .ShouldBe(1);
        }
        public async Task MakingTwoApiRequests_GetsNewToken_WhenTokenIsExpired()
        {
            await StubAdminClient.ResetRequestsAsync();

            payment = new Payment
            {
                CardNumber  = "1234-1234-1234-1234",
                Amount      = 1000m,
                Currency    = "GBP",
                Cvv         = "123",
                ExpiryMonth = "Dec",
                ExpiryYear  = "2022"
            };

            await bankClient.Payment.Process(payment);

            await bankClient.Payment.Process(payment);

            var requestsMade = await StubAdminClient.GetRequestsAsync();

            requestsMade.Count(x => x.Request.AbsolutePath == TokenPath &&
                               x.Response.StatusCode.Equals(200L))
            .ShouldBe(2);
        }