@Test
public void testFormatExportedVars_severalInstances() {

	TestApplication app = new TestApplication();
	app.getTomcat().getComponent().exportedVariables.put( "path", new ExportedVariable( "path", "apps" ));
	Map<String,String> exportedVariables = ScriptUtils.formatExportedVars( app.getTomcatVm());
	Assert.assertEquals( 0, exportedVariables.size());
	exportedVariables = ScriptUtils.formatExportedVars( app.getTomcat());
	Assert.assertEquals( 1, exportedVariables.size());
	Assert.assertEquals( "apps", exportedVariables.get( "path" ));
	exportedVariables = ScriptUtils.formatExportedVars( app.getWar());
	Assert.assertEquals( 3, exportedVariables.size());
	Assert.assertEquals( "apps", exportedVariables.get( "ANCESTOR_tomcat_path" ));
	Assert.assertEquals( "8080", exportedVariables.get( "port" ));
	Assert.assertNull( exportedVariables.get( "ip" ));
}