### Question:
ScriptOperations { public Result evaluate(File currentDir, String script, Integer timeout, PrintStream stdout, PrintStream stderr) throws ScriptException { ScriptEngine scriptEngine = getEngineFactory().getScriptEngine(); DirectoryResource resource = getResourceFactory().create(DirectoryResource.class, currentDir); ScriptContext context = ScriptContextBuilder.create() .currentResource(resource) .timeout(timeout) .stdout(stdout) .stderr(stderr) .build(); return (Result) scriptEngine.eval(script, context); } ScriptOperations(); Result evaluate(File currentDir, String script, Integer timeout, PrintStream stdout, PrintStream stderr);  }### Answer:
@Test public void testScriptOperationsEvaluateShouldSucceed() throws Exception { Result result = scriptOperations.evaluate(OperatingSystemUtils.getUserHomeDir(), "pwd", 500, null, null); Assert.assertThat(result, not(instanceOf(Failed.class))); }