@Test public void testCreateUpdateDeleteZone() { skipIfNotGlobalAdmin(); Zone zone = null; String zoneName = prefix + "-zone"; try { zone = globalAdminClient.getZoneApi().createZone(zoneName, NetworkType.BASIC, "8.8.8.8", "10.10.10.10"); assertNotNull(zone); assertEquals(zone, globalAdminClient.getZoneApi().getZone(zone.getId())); assertEquals(zone.getNetworkType(), NetworkType.BASIC); assertEquals(zone.getDNS(), ImmutableList.of("8.8.8.8")); assertEquals(zone.getInternalDNS(), ImmutableList.of("10.10.10.10")); Zone updated = globalAdminClient.getZoneApi().updateZone(zone.getId(), name(zoneName + "-2").externalDns(ImmutableList.of("8.8.4.4"))); assertEquals(updated.getId(), zone.getId()); assertEquals(updated.getDNS(), ImmutableList.of("8.8.4.4")); } finally { if (zone != null) { globalAdminClient.getZoneApi().deleteZone(zone.getId()); } } }