public async Task EnsureOrderCanOnlyBePartiallyRefundedWhenPaymentStatusIsPaidOrPartiallyRefundedAndPaymentModuleSupportsPartialRefund()
        {
            var order = new Order
            {
                OrderTotal = 100,
                PaymentMethodSystemName = "Payments.TestMethod"
            };

            TestPaymentMethod.TestSupportPartiallyRefund = true;

            foreach (OrderStatus os in Enum.GetValues(typeof(OrderStatus)))
            {
                foreach (PaymentStatus ps in Enum.GetValues(typeof(PaymentStatus)))
                {
                    foreach (ShippingStatus ss in Enum.GetValues(typeof(ShippingStatus)))
                    {
                        order.OrderStatus    = os;
                        order.PaymentStatus  = ps;
                        order.ShippingStatus = ss;

                        if (ps == PaymentStatus.Paid || order.PaymentStatus == PaymentStatus.PartiallyRefunded)
                        {
                            var canPartiallyRefund = await _orderProcessingService.CanPartiallyRefundAsync(order, 10);

                            canPartiallyRefund.Should().BeTrue();
                        }
                        else
                        {
                            var canPartiallyRefund = await _orderProcessingService.CanPartiallyRefundAsync(order, 10);

                            canPartiallyRefund.Should().BeFalse();
                        }
                    }
                }
            }

            TestPaymentMethod.TestSupportPartiallyRefund = false;

            foreach (OrderStatus os in Enum.GetValues(typeof(OrderStatus)))
            {
                foreach (PaymentStatus ps in Enum.GetValues(typeof(PaymentStatus)))
                {
                    foreach (ShippingStatus ss in Enum.GetValues(typeof(ShippingStatus)))
                    {
                        order.OrderStatus    = os;
                        order.PaymentStatus  = ps;
                        order.ShippingStatus = ss;

                        var canPartiallyRefund = await _orderProcessingService.CanPartiallyRefundAsync(order, 10);

                        canPartiallyRefund.Should().BeFalse();
                    }
                }
            }
        }