@@ -0,0 +1,1444 @@
+import javax.script.*;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class Main %7B%0A%0A    public void addBadge(String badgeName) %7B%0A        System.out.println(%22Badge %5B%22 + badgeName + %22%5D added !%22);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        ScriptEngine engine = new ScriptEngineManager().getEngineByName(%22nashorn%22);%0A        try %7B%0A//            engine.eval(%22var fun1 = function(user) %7B print('user is: ' + user); %7D%22);%0A%0A            engine.eval(%22var fun1 = function(user, scales) %7B%22 +%0A                    %22var Helper = Java.type('Main');%22 +%0A                    %22var quaris = new Helper();%22 +%0A                    %22print('user is: ' + user + ', replies:' + scales.replies);%22 +%0A                    %22quaris.addBadge('asd');%22 +%0A                    %22%7D%22);%0A%0A//            final Bindings bindings = engine.createBindings();%0A//            bindings.put(%22quaris%22, new JavaHelper());%0A//            engine.setBindings(bindings, ScriptContext.GLOBAL_SCOPE);%0A%0A            Invocable invocable = (Invocable) engine;%0A%0A            Map%3CString, Object%3E scales = new HashMap%3C%3E();%0A            scales.put(%22replies%22, 10);%0A            scales.put(%22level%22, 1250);%0A%0A            Object result = invocable.invokeFunction(%22fun1%22, %22Testuser%22, scales);%0A            System.out.println(result);%0A        %7D catch (ScriptException e) %7B%0A            e.printStackTrace();%0A        %7D catch (NoSuchMethodException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%7D%0A

Add nashorn test