responseWithAccess,
authenticatedGET().endpoint(endpoint).build(),
HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/limit-list.json")).build()
).getLimitApi();
Limits limits = api.list();
assertEquals(limits.getAbsoluteLimits().get("records per domain"), Integer.valueOf(500));
assertEquals(limits.getAbsoluteLimits().get("domains"), Integer.valueOf(500));
assertEquals(Iterables.size(limits.getRateLimits()), 2);
RateLimit statusRateLimit = Iterables.tryFind(limits.getRateLimits(), isStatusRateLimit()).orNull();
assertEquals(statusRateLimit.getRegex(), ".*/v\\d+\\.\\d+/(\\d+/status).*");
assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getVerb(), "GET");
assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getValue(), 5);
assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getRemaining().get(), Integer.valueOf(5));
assertEquals(Iterables.get(statusRateLimit.getLimits(), 0).getUnit(), "SECOND");