Code example for ResourceScriptSource

0
	} 
 
	@Test
	public void test3() { 
		ScriptSource source =
			new ResourceScriptSource(new ClassPathResource("/org/springframework/integration/scripting/jsr223/test3.py"));
		Object obj =  executor.executeScript(source);
		PyTuple tuple = (PyTuple) obj;
		assertEquals(1, tuple.get(0));
	} 
 
	@Test
	public void testEmbeddedVariable() { 
		Map<String,Object> variables = new HashMap<String,Object>();
		variables.put("scope", "world");
		Object obj = executor.executeScript(new StaticScriptSource("\"hello, %s\"% scope"),variables);
		assertEquals("hello, world",obj);
	} 
}