### Question:
JavaScriptEngine implements ScriptEngine, Compilable { @Override public void setBindings(Bindings bindings, int scope) { context.setBindings(bindings, scope); }  void setNameStrategy(NameStrategy nameStrategy); void setConstructorStrategy(ConstructorStrategy constructorStrategy); void setExecutionStrategyFactory(ExecutionStrategyFactory executionStrategyFactory); void setExecutionClassLoader(ClassLoader executionClassLoader); void setIsolation(Isolation isolation); @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 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 JavaCompiledScript compile(String script); @Override ScriptEngineFactory getFactory();  }### Answer:
@Test public void testSetBindings() throws ScriptException { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("java"); engine.setBindings(null, ScriptContext.GLOBAL_SCOPE); assertThatThrownBy(() -> { engine.setBindings(null, ScriptContext.ENGINE_SCOPE); }).isInstanceOf(NullPointerException.class); assertThatThrownBy(() -> { engine.setBindings(new SimpleBindings(), -999); }).isInstanceOf(IllegalArgumentException.class); }