> +   }
> +   
> +   @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();
> +   }

To avoid confusion, jclouds provides a set of default fallbacks that will be 
executed if no fallback is defined on a method (typically these fallbacks throw 
an appropriate exception).

* There should be **no tests** for fallbacks in methods that don't explicitly 
declare a fallback, as we don't want to test what jclouds does by default; it 
is already tested in jclouds core.
* There **must** be tests for fallbacks in those methods where you explicitly 
declare one, as that method won't use the jclouds default and we want to make 
sure the right fallback takes place upon failed requests.

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

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

Reply via email to