@Test
public void testInvoiceRetrieveForCustomerPerCallAPIKey()
throws StripeException {
Plan plan = Plan.create(getUniquePlanParams(), Stripe.apiKey);
Customer customer = createDefaultCustomerWithPlan(plan);
Map<String, Object> listParams = new HashMap<String, Object>();
listParams.put("customer", customer.getId());
listParams.put("count", 1);
Invoice invoice = Invoice.all(listParams, Stripe.apiKey).getData()
.get(0);
assertEquals(invoice.getCustomer(), customer.getId());
}