title: Why is Map.Entry.getValue unknown in java's javascript engine?
body: <pre><code>@Test
  public void testB() throws ScriptException, NoSuchMethodException {
      ScriptEngineManager manager = new ScriptEngineManager();
      ScriptEngine engine = manager.getEngineByName("JavaScript");
      String script = "function one(map){\n" + "for(entry in map){\n"
              + "entry.getValue();\n" + "entry.getKey();\n" + "}}";
      HashMap map = new HashMap();
      map.put("keyOne", "valueOne");
      String functionName = "one";
  
      engine.eval(script);
  
      Invocable inv = (Invocable) engine;
  
      inv.invokeFunction(functionName, map);
  }
  </code></pre>
  
  <p>Stacktrace</p>
  
  <pre><code>javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: 
  Cannot find function getValue. (&lt;Unknown source&gt;#3) in &lt;Unknown source&gt; at line number 3
  at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:184)
  at com.sun.script.javascript.RhinoScriptEngine.invokeFunction(RhinoScriptEngine.java:142
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at junit.framework.TestCase.runTest(TestCase.java:168)
  at junit.framework.TestCase.runBare(TestCase.java:134)
  at junit.framework.TestResult$1.protect(TestResult.java:110)
  at junit.framework.TestResult.runProtected(TestResult.java:128)
  at junit.framework.TestResult.run(TestResult.java:113)
  at junit.framework.TestCase.run(TestCase.java:124)
  at junit.framework.TestSuite.runTest(TestSuite.java:243)
  at junit.framework.TestSuite.run(TestSuite.java:238)
  at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
  at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  </code></pre>
  
  <p>I assume there's something I'm not aware of that I need to do to make it work that I can't find documented.</p>