### Question:
RhinoScriptEngine extends AbstractScriptEngine implements Compilable { @Override public Object eval(final String source, final ScriptContext scriptContext) throws ScriptException { return eval(new StringReader(source), scriptContext); } RhinoScriptEngine(RhinoScriptEngineFactory factory); @Override Object eval(final String source, final ScriptContext scriptContext); @Override Object eval(final Reader reader, final ScriptContext scriptContext); @Override Bindings createBindings(); @Override RhinoScriptEngineFactory getFactory(); @Override CompiledScript compile(final String source); @Override CompiledScript compile(final Reader reader); @Override String toString();  }### Answer:
@Test public void shouldEvaluateSimpleScripts() throws Exception { String script = "3 * 4"; Number result = (Number) testEngine.eval(script); assertThat(result.intValue()).isEqualTo(12); }
@Test public void shouldSupportJSONParsing() throws Exception { String script = "var x = JSON.parse('{\"a\" : 12}'); x['a']"; Object result = testEngine.eval(script); assertThat(result).isEqualTo(12); }