Object i1 = ((org.mozilla.javascript.NativeArray)o).get(0, scope);
System.out.println(i1.getClass().toString());
System.out.println(i1);
//Scriptable jsObj = (Scriptable)o;
*/
ResultMap entry;
Object o;
o = ctx.evaluateString(scope, "function foo(){return {six:7}};foo()", "inline", 0, null);
entry = Util.wrapScriptableMap((Scriptable)o);
assertEquals(7.0,entry.get("six"));
assertEquals(Util.literalList().a("six"), Arrays.asList(entry.getIds()));
o = ctx.evaluateString(scope, "function foo(){return {six:['seven','eight']}};foo()", "inline", 0, null);
entry = Util.wrapScriptableMap((Scriptable)o);
assertEquals(Util.literalList().a("seven").a("eight"),entry.get("six"));
o = ctx.evaluateString(scope, "function foo(){return {six:{a:7,b:8}}};foo()", "inline", 0, null);
entry = Util.wrapScriptableMap((Scriptable)o);
o = entry.get("six");
assertEquals(Util.literalMap().p("a",7.0).p("b",8.0),entry.get("six"));
o = ctx.evaluateString(scope, "function foo(){return {a:7,b:8}};foo()", "inline", 0, null);
entry = Util.wrapScriptableMap((Scriptable)o);
assertEquals(Util.literalSet().a(7.0).a(8.0), new HashSet(entry.values()));
//assertEquals(Util.literalList().a(3).a(4).a(5), entry.get("nums"));
} finally { Context.exit(); }
}