public Object test(Map<String, Object> input) {

        ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByName("Nashorn");
        if (scriptEngine == null) {
            LOGGER.error("missing " + ENGINE + " engine.  Ensure you are running supported JVM");
            return this;
        }

        try {

            Bindings bindings = scriptEngine.createBindings();
            bindings.put("$", input);
            return scriptEngine.eval(getExpression(), bindings);

        } catch (ScriptException e) {
            String message = e.getMessage();
            throw new ValidationError(message);
        }
    }
Helper method to unit test your javascript. The method is not used for creating or executing
workflow but is meant for testing only.

@param input Input that against which the script will be executed
@return Output of the script
java-sdk/src/main/java/com/netflix/conductor/sdk/workflow/def/tasks/Javascript.java