> +
> + AvailabilityZone availabilityZoneActual =
> Iterables.getFirst(api.list(), null);
> + AvailabilityZone availabilityZoneExpected = getTestAvailabilityZone();
> +
> + assertNotNull(availabilityZoneActual);
> + assertEquals(availabilityZoneActual.getName(),
> availabilityZoneExpected.getName());
> + assertEquals(availabilityZoneActual.getState().available(),
> availabilityZoneExpected.getState().available());
> + }
> +
> + protected AvailabilityZone getTestAvailabilityZone() {
> + return AvailabilityZone.builder()
> + .name("nova")
> + .isAvailable(ZoneState.builder().available(true).build())
> + .build();
> + }
> +}
The API defines a special behavior for 404 responses (the fallback). Add a test
that verifies that the empty iterable is properly returned on a 404.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/560/files#r18568316