public void testListImagesDetail() throws Exception { Set<Image> response = client.listImages(); assert null != response; long imageCount = response.size(); assertTrue(imageCount >= 0); for (Image image : response) { assertTrue(image.getId() >= 1); assert null != image.getName() : image; } }
public void testGetImagesDetail() throws Exception { Set<Image> response = client.listImages(); assert null != response; long imageCount = response.size(); assertTrue(imageCount >= 0); for (Image image : response) { try { Image newDetails = client.getImage(image.getId()); assertEquals(image, newDetails); } catch (HttpResponseException e) { // Ticket #9867 if (e.getResponse().getStatusCode() != 400) throw e; } } }