> + }
> + }
> +
> + public void testNotFound() throws Exception {
> + MockWebServer server = mockWebServer();
> + server.enqueue(new
> MockResponse().setBody(payloadFromResource("/not-found.json")));
> +
> + DigitalOceanApi api = api(server.getUrl("/"));
> + ImageApi imageApi = api.getImageApi();
> +
> + try {
> + imageApi.list();
> + fail("Request should have failed");
> + } catch (Exception ex) {
> + assertTrue(ex instanceof ResourceNotFoundException, "Exception
> should be a ResourceNotFoundException");
> + assertEquals(ex.getMessage(), "Not Found");
Also a constant?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9166756