@Test
private void testCreatePublishZone() throws Exception {
Zone zone = api.getZoneApi().get(fqdn);
if (zone == null) {
Job job = api.getZoneApi().scheduleCreateWithContact(fqdn, contact);
checkNotNull(job, "unable to create zone %s", fqdn);
getAnonymousLogger().info("created zone: " + job);
assertEquals(job.getStatus(), Status.SUCCESS);
assertEquals(api.getJob(job.getId()), job);
zone = api.getZoneApi().publish(fqdn);
checkNotNull(zone, "unable to publish zone %s", fqdn);
getAnonymousLogger().info("published zone: " + zone);
}
checkZone(zone);