> +   }
> +   
> +   @Test
> +   public void testDelete() throws InterruptedException {
> +      server.enqueue(
> +         new MockResponse().setBody("")
> +      );
> +      
> +      imageApi().deleteImage("some-id");
> +      assertEquals(server.getRequestCount(), 1);
> +      assertSent(server, "DELETE", "/images/some-id");
> +   }
> +        
> +   private ImageApi imageApi() {
> +      return api.imageApi();
> +   }

> Rule of thumb is: if your method has a @Fallback annotation, it needs a test. 
> Otherwise, fallback test is not needed.

+1.

So in this case: a 404/401 test won't be needed for `updateImage`, because it 
doesn't have a declared fallback (and jclouds will propagate an appropriate 
exception), but we need one for `getImage`, so that we can verify that the 
method's behavior indeed returns an empty list, instead of a 
`ResourceNotFoundException`/`AuthorizationException`.  

I got confused with this as well. Sorry for the confusion, @mirza-spc !

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

Reply via email to