@Test(groups = "unit", testName = "AvailabilityZoneApiExpectTest")
public class AvailabilityZoneApiExpectTest extends BaseCinderApiExpectTest {
public void testListAvailabilityZones() throws Exception {
URI endpoint = URI.create("http://172.16.0.1:8776/v1/50cdb4c60374463198695d9f798fa34d/os-availability-zone");
AvailabilityZoneApi api = requestsSendResponses(
keystoneAuthWithUsernameAndPasswordAndTenantName,
responseWithKeystoneAccess,
authenticatedGET().endpoint(endpoint).build(),
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/availability_zones_list.json")).build()
).getAvailabilityZoneApi("RegionOne");
AvailabilityZone availabilityZoneActual = Iterables.getFirst(api.list(), null);
AvailabilityZone availabilityZoneExpected = getTestAvailabilityZone();
assertNotNull(availabilityZoneActual);
assertEquals(availabilityZoneActual, availabilityZoneExpected);
}