@Test
public void testReadProperties() throws Exception {

	Instance instance = new Instance( "inst" ).component( new Component( "comp" ).installerName( "something" ));
	PluginFile plugin = new PluginFile();
	File instanceDirectory = InstanceHelpers.findInstanceDirectoryOnAgent( instance );
	Utils.deleteFilesRecursively( instanceDirectory );
	Properties properties = plugin.readProperties( instance );
	Assert.assertEquals( 0, properties.size());
	Assert.assertTrue( instanceDirectory.mkdirs());
	File file = new File( instanceDirectory, PluginFile.FILE_NAME );
	String content = "toto = 1\ntiti=something\n1.re.s = pou";
	Utils.writeStringInto( content, file );
	properties = plugin.readProperties( instance );
	Assert.assertEquals( 3, properties.size());
	Assert.assertEquals( "1", properties.getProperty( "toto" ));
	Assert.assertEquals( "something", properties.getProperty( "titi" ));
	Assert.assertEquals( "pou", properties.getProperty( "1.re.s" ));
	Utils.deleteFilesRecursively( instanceDirectory );
}