test_class.file: step-functions-plugins/step-functions-plugins-java/step-functions-plugins-java-handler/src/test/java/step/plugins/java/handler/GeneralScriptHandlerTest.java
test_class.identifier: GeneralScriptHandlerTest
test_case.body: @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());
  	}
test_case.class_method_signature: GeneralScriptHandlerTest.testJS223GroovyErrorWithFailingHandler()
test_case.full_signature: @Test public void testJS223GroovyErrorWithFailingHandler()
test_case.identifier: testJS223GroovyErrorWithFailingHandler
test_case.invocations: createHandler setFunction setPayload build add createObjectBuilder put put put put put setProperties handle assertEquals getMsg getError
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJS223GroovyErrorWithFailingHandler()
focal_class.file: step-functions-plugins/step-functions-plugins-java/step-functions-plugins-java-handler/src/main/java/step/plugins/java/handler/GeneralScriptHandler.java
focal_class.identifier: GeneralScriptHandler
focal_class.class_method_signature: GeneralScriptHandler.handle(Input<JsonObject> input)
focal_class.full_signature: @Override public Output<JsonObject> handle(Input<JsonObject> input)
focal_class.identifier: handle
focal_class.modifiers: @Override public
focal_class.parameters: (Input<JsonObject> input)
focal_class.return: Output<JsonObject>
focal_class.signature: Output<JsonObject> handle(Input<JsonObject> input)
focal_class.superclass: extends JsonBasedFunctionHandler
focal_method.body: @Override
  	public Output<JsonObject> handle(Input<JsonObject> input) throws Exception {
  		// Using the forked to branch in order no to have the ClassLoader of java-plugin-handler.jar as parent.
  		// the project java-plugin-handler.jar has many dependencies that might conflict with the dependencies of the 
  		// keyword. One of these dependencies is guava for example.
  		pushLocalApplicationContext(FORKED_BRANCH, getCurrentContext().getClassLoader(), "step-functions-plugins-java-keyword-handler.jar");
  		
  		pushRemoteApplicationContext(FORKED_BRANCH, ScriptHandler.PLUGIN_LIBRARIES_FILE, input.getProperties());
  		
  		pushRemoteApplicationContext(FORKED_BRANCH, ScriptHandler.LIBRARIES_FILE, input.getProperties());
  		
  		String scriptLanguage = input.getProperties().get(ScriptHandler.SCRIPT_LANGUAGE);
  		Class<?> handlerClass = scriptLanguage.equals("java")?JavaJarHandler.class:ScriptHandler.class;
  		return delegate(handlerClass.getName(), input);		
  	}
focal_method.class_method_signature: GeneralScriptHandler.handle(Input<JsonObject> input)
focal_method.full_signature: @Override public Output<JsonObject> handle(Input<JsonObject> input)
focal_method.identifier: handle
focal_method.invocations: pushLocalApplicationContext getClassLoader getCurrentContext pushRemoteApplicationContext getProperties pushRemoteApplicationContext getProperties get getProperties equals delegate getName
focal_method.modifiers: @Override public
focal_method.parameters: (Input<JsonObject> input)
focal_method.return: Output<JsonObject>
focal_method.signature: Output<JsonObject> handle(Input<JsonObject> input)