public void CreateAPaymentTest()
        {
            #region Payment Objects

            //Amount Details
            AmountDetail amountDetail = new AmountDetail("4000.00", "USD");

            // Credit Card
            CreditCard creditCard = new CreditCard("4111111111111111", DateTime.Now.AddMonths(new Random().Next(99)).ToString("yyyy-MM"), "VISA", "123");

            // Bank Account
            BankAccount bankAccount = new BankAccount(null, "325070760", "4111111", "demo acount", null, "bank anme",
                                                      null);

            //Base AddressBillTo
            BaseAddress baseAdressBillTo = new BaseAddress
            {
                Address1    = " Demo Adress",
                Company     = "XXXXCOMAPNAY",
                Country     = "India",
                FirstName   = "Demo fst",
                LastName    = "Demo Second",
                PhoneNumber = "1123456987",
                PostalCode  = "192123"
            };

            //Base AddressShipTo
            BaseAddress baseAdressShipTo = new BaseAddress
            {
                Address1    = " Demo Adress",
                Company     = "XXXXCOMAPNAY",
                Country     = "India",
                FirstName   = "Demo ",
                LastName    = "Demo Second",
                PhoneNumber = "1123456987",
                PostalCode  = "192123"
            };

            // Ip Address
            String Ip = null;

            // Order
            Order order = new Order("12365");

            //Payment Instrunment
            PaymentInstrument paymentInstrument = new PaymentInstrument(creditCard, null, null, null, true);

            // Items
            List <LineItem> lineItems = new List <LineItem>();
            lineItems.Add(new LineItem("1", "tshir", "t-shir desc", 1, "100", true));

            // Payment Request
            PaymentRequest paymentRequest = new PaymentRequest(true,
                                                               amountDetail, null, paymentInstrument,
                                                               baseAdressBillTo, baseAdressShipTo, Ip, order, null, null,
                                                               null, lineItems);

            #endregion
            string authorization = "Basic asdadsa";
            mockRestClient.Expects.One.Method(v => v.Execute(new RestRequest())).With(NMock.Is.TypeOf(typeof(RestRequest))).WillReturn(paymentResponse);
            ApiClient apiClient = new ApiClient(mockRestClient.MockObject);

            apiClient.Configuration = null;

            Configuration configuration = new Configuration
            {
                ApiClient      = apiClient,
                Username       = "******",
                Password       = "******",
                AccessToken    = null,
                ApiKey         = null,
                ApiKeyPrefix   = null,
                TempFolderPath = null,
                DateTimeFormat = null,
                Timeout        = 60000,
                UserAgent      = "asdasd"
            };

            instance = new PaymentsApi(configuration);
            var response = instance.CreateAPayment(paymentRequest, authorization);
            Assert.IsInstanceOf <Payment>(response, "response is Payment");
        }