### Question:
StandardScriptEvaluator implements ScriptEvaluator { @Override public void bindVariableInGlobalScope(final String name, final Object object) { Reject.ifNull(name, object); scriptEngineManager.put(name, object); } StandardScriptEvaluator(StandardScriptEngineManager scriptEngineManager); @Override void bindVariableInGlobalScope(final String name, final Object object); @Override @SuppressWarnings("unchecked") T evaluateScript(final ScriptObject script, final Bindings bindings);  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public void shouldRejectNullVariableNames() { testEvaluator.bindVariableInGlobalScope(null, "value"); }
@Test(expectedExceptions = NullPointerException.class) public void shouldRejectNullVariableValues() { testEvaluator.bindVariableInGlobalScope("test", null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void shouldRejectEmptyVariableNames() { testEvaluator.bindVariableInGlobalScope("", "value"); }
@Test public void shouldBindVariablesInGlobalScope() { String name = "aTestVariable"; Object value = "Some test object"; testEvaluator.bindVariableInGlobalScope(name, value); Object result = scriptEngineManager.get(name); assertThat(result).isNotNull().isEqualTo(value); }