@Test
public void testJS223GroovyErrorWithFailingHandler() throws Exception {

	GeneralScriptHandler handler = createHandler();
	Input<JsonObject> input = new Input<>();
	input.setFunction("MyKeyword1");
	input.setPayload(Json.createObjectBuilder().add("key1", "MyValue").build());
	HashMap<String, String> properties = new HashMap<>();
	properties.put(ScriptHandler.SCRIPT_LANGUAGE, "groovy");
	properties.put(ScriptHandler.SCRIPT_FILE+".id", "scripts/throwable.groovy");
	properties.put(ScriptHandler.SCRIPT_FILE+".version", "");
	properties.put(ScriptHandler.ERROR_HANDLER_FILE+".id", "scripts/throwable.groovy");
	properties.put(ScriptHandler.ERROR_HANDLER_FILE+".version", "");
	input.setProperties(properties);
	
	Output<JsonObject> output = handler.handle(input);
	Assert.assertEquals("Error while running error handler script: throwable.groovy. assert false\n", output.getError().getMsg());
}