final Client clientWithJacksonSerializer = Client.create(cc);
clientWithJacksonSerializer.addFilter(new LoggingFilter());
clientWithJacksonSerializer.addFilter(new HTTPBasicAuthFilter(watchUser, watchPassword));
WebResource resource = clientWithJacksonSerializer.resource(watchEndpoint);
final AsyncRequest areq = new AsyncRequest("monitor plan: " + plan.getPlanProperties().getName(), triggers);
final AsyncRequest areq2 = resource.path(KBUtils.ASYNC_REQUEST + ".json/new").accept(MediaType.APPLICATION_JSON)
.post(AsyncRequest.class, areq);
} catch (Exception e) {
throw new PlanningException("Failed to access endpoint.", e);
}
} else {