@Test
public void testDeleteWebhook() {
for (String zone : api.getConfiguredZones()) {
Group g = created.get(zone).get(0);
WebhookApi webhookApi = api.getWebhookApiForGroupAndPolicyInZone(g.getId(), g.getScalingPolicies().iterator().next().getId(), zone);
WebhookResponse webhook = webhookApi.create("test1", ImmutableMap.<String, Object>of("notes", "test metadata")).first().get();
assertEquals(webhook.getName(), "test1");
assertEquals(webhook.getMetadata().get("notes"), "test metadata");
assertTrue( webhookApi.delete(webhook.getId()) );
assertNull( webhookApi.get(webhook.getId()) );
}
}