server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"messages\":{\"claimed\":0,\"total\":0,\"free\":0}}"));
try {
MarconiApi api = api(server.getUrl("/").toString(), "openstack-marconi");
QueueApi queueApi = api.getQueueApiForZoneAndClient("DFW", CLIENT_ID);
QueueStats stats = queueApi.getStats("jclouds-test");
assertEquals(stats.getMessagesStats().getClaimed(), 0);
assertEquals(stats.getMessagesStats().getFree(), 0);
assertEquals(stats.getMessagesStats().getTotal(), 0);
assertFalse(stats.getMessagesStats().getOldest().isPresent());
assertFalse(stats.getMessagesStats().getNewest().isPresent());
assertEquals(server.getRequestCount(), 2);
assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
assertEquals(server.takeRequest().getRequestLine(), "GET /v1/123123/queues/jclouds-test/stats HTTP/1.1");
}