### Question:
JShellScriptEngine implements ScriptEngine, Compilable { @Override public Object eval(Reader reader) throws ScriptException { return eval(readScript(reader)); }  @Override ScriptContext getContext(); @Override void setContext(ScriptContext context); @Override Bindings createBindings(); @Override Bindings getBindings(int scope); @Override void setBindings(Bindings bindings, int scope); @Override void put(String key, Object value); @Override Object get(String key); @Override ScriptEngineFactory getFactory(); @Override Object eval(Reader reader); @Override Object eval(String script); @Override Object eval(Reader reader, ScriptContext context); @Override Object eval(String script, ScriptContext context); @Override Object eval(Reader reader, Bindings bindings); @Override Object eval(String script, Bindings bindings); @Override CompiledScript compile(Reader reader); @Override CompiledScript compile(String script);  }### Answer:
@Test public void testEvalReader() throws ScriptException { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("jshell"); Reader reader = new StringReader("1234"); Object result = engine.eval(reader); assertThat(result).isEqualTo(1234); }
@Test public void testEvalReaderFail() { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("jshell"); Reader reader = new FailReader(); assertThatThrownBy(() -> { Object result = engine.eval(reader); }).isInstanceOf(ScriptException.class); }