@Test(expected = ScriptException.class)
public void testBadSyntax() throws ScriptException {

   ScriptEngineManager mgr = new ScriptEngineManager();
   ScriptEngine engine = mgr.getEngineByExtension("java");
   String message = "how are you?";
   Assert.assertEquals(message, engine.eval(message));
}