> + try {
> + AutoscaleApi autoscaleApi = api(server.getUrl("/").toString(),
> "rackspace-autoscale", overrides);
> + WebhookApi api =
> autoscaleApi.getWebhookApiForZoneAndGroupAndPolicy("DFW", "1234567890",
> "321456");
> +
> + FluentIterable<WebhookResponse> webhooks = api.create("PagerDuty",
> ImmutableMap.<String, Object>of("notes", "PagerDuty will fire this webhook"));
> +
> + /*
> + * Check request
> + */
> + assertAuthentication(server);
> + assertRequest(server.takeRequest(), "POST",
> "/v1.0/888888/groups/1234567890/policies/321456/webhooks",
> "/autoscale_webhook_create_request.json");
> +
> + /*
> + * Check response
> + */
> + assertTrue(webhooks.isEmpty());
`webhooks.isEmpty(), "Expected no webhooks but was: " + webhooks`, or something
like that?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/67/files#r8426020