### Question:
GroovyEngineFactory extends GroovyScriptEngineFactory { @Override public ScriptEngine getScriptEngine() { return new SandboxedGroovyScriptEngine(this, groovyScriptEngine, sandbox); } GroovyEngineFactory(); @Override ScriptEngine getScriptEngine(); void setSandbox(final GroovyValueFilter sandbox);  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public void shouldErrorIfNoSandboxConfigured() { testFactory.getScriptEngine(); }