> +      return properties;
> +   }
> +
> +   public void testAccessDenied() throws Exception {
> +      MockWebServer server = mockWebServer();
> +      server.enqueue(new 
> MockResponse().setBody(payloadFromResource("/access-denied.json")));
> +
> +      DigitalOceanApi api = api(server.getUrl("/"));
> +      ImageApi imageApi = api.getImageApi();
> +
> +      try {
> +         imageApi.list();
> +         fail("Request should have failed");
> +      } catch (Exception ex) {
> +         assertTrue(ex instanceof AuthorizationException, "Exception should 
> be an AuthorizationException");
> +         assertEquals(ex.getMessage(), "Access Denied");

Isn't "Access Denied" a constant somewhere?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9166741

Reply via email to