@Test
public void testExecuteScriptResources_ok() throws Exception {

	Assume.assumeTrue( TestUtils.isUnix());
	File scriptsDir = this.folder.newFolder();
	// Nothing to execute
	AgentUtils.executeScriptResources( scriptsDir );
	Assert.assertEquals(0, scriptsDir.listFiles().length);
	// Something invalid to execute
	File script = new File( scriptsDir, "toto.sh" );
	Utils.writeStringInto( "#!/bin/bash\necho totototototo > toto.txt", script);
	Assert.assertEquals( 1, scriptsDir.listFiles().length );
	File toto = new File( scriptsDir,"toto.txt" );
	Assert.assertFalse( toto.exists());
	AgentUtils.executeScriptResources( scriptsDir );
	Assert.assertFalse( toto.exists());
	Assert.assertEquals( 1, scriptsDir.listFiles().length );
	Assert.assertTrue( script.delete());
	// Something to execute
	script = new File( scriptsDir, "toto." + Constants.SCOPED_SCRIPT_AT_AGENT_SUFFIX + "sh" );
	Utils.writeStringInto( "#!/bin/bash\necho totototototo > toto.txt", script);
	AgentUtils.executeScriptResources( scriptsDir );
	Assert.assertTrue( toto.exists());
	Assert.assertEquals( 2, scriptsDir.listFiles().length );
	String s = Utils.readFileContent( toto );
	Assert.assertEquals( "totototototo", s.trim());
}