public static void runInJsonRunner(String baseUrl, String addonKey, String eventId, boolean excludedBody,
String filter, List<String> propertyKeys, WebHookTester tester) throws Exception {
final String path = "/webhook";
final WebHookTestServlet servlet = new WebHookTestServlet();
ConnectRunner runner = new ConnectRunner(baseUrl, addonKey)
.setAuthenticationToNone()
.addModule("webhooks", newWebHookBean().withEvent(eventId).withUrl(path).withExcludeBody(excludedBody).withFilter(filter).withPropertyKeys(propertyKeys).build())
.addRoute(path, servlet)
.addModule("webItems", randomWebItemBean())
.addScope(ScopeName.READ)
.start();
try {
tester.test(servlet::waitForHook);
} finally {
runner.stopAndUninstall();
}
}