@Test(groups = {"integration", "live"})
 public void testGetAssignableLocations() throws Exception {
   for (Location location : client.listAssignableLocations()) {
     System.err.printf("location %s%n", location);
     assert location.getId() != null : location;
     assert location != location.getParent() : location;
     assert location.getScope() != null : location;
     switch (location.getScope()) {
       case PROVIDER:
         assertProvider(location);
         break;
       case REGION:
         assertProvider(location.getParent());
         break;
       case ZONE:
         Location provider = location.getParent().getParent();
         // zone can be a direct descendant of provider
         if (provider == null) provider = location.getParent();
         assertProvider(provider);
         break;
       case HOST:
         Location provider2 = location.getParent().getParent().getParent();
         // zone can be a direct descendant of provider
         if (provider2 == null) provider2 = location.getParent().getParent();
         assertProvider(provider2);
         break;
     }
   }
 }