@Test
public void testJavaFragment() throws Exception {

   ScriptEngineManager mgr = new ScriptEngineManager();
   ScriptEngine engine = mgr.getEngineByExtension("java");
   Assert.assertEquals("Hello, world!", (String) engine.eval("System.out.print(\"Hello, world!\");"));
   Assert.assertEquals("HELLO, WORLD!", (String) engine.eval("System.out.print(\"Hello, world!\".toUpperCase());"));
   Assert.assertEquals("2", engine.eval("System.out.print(1 + 1);"));
}