@Test
public void testFindAllExportedVariables() {

	Instance instance = new Instance( "inst 1" ).component( new Component( "c" ));
	Assert.assertEquals( 0, InstanceHelpers.findAllExportedVariables( instance ).size());
	instance.overriddenExports.put( "var1", "value1" );
	Map<String,String> map = InstanceHelpers.findAllExportedVariables( instance );
	Assert.assertEquals( 1, map.size());
	Assert.assertEquals( "value1", map.get( "var1" ));
	Component component = new Component( "comp 1" );
	component.addExportedVariable( new ExportedVariable( "var1", "another value" ));
	component.addExportedVariable( new ExportedVariable( "var2", "value2" ));
	instance.setComponent( component );
	map = InstanceHelpers.findAllExportedVariables( instance );
	Assert.assertEquals( 2, map.size());
	Assert.assertEquals( "value1", map.get( "comp 1.var1" ));
	Assert.assertEquals( "value2", map.get( "comp 1.var2" ));
	instance.overriddenExports.clear();
	map = InstanceHelpers.findAllExportedVariables( instance );
	Assert.assertEquals( 2, map.size());
	Assert.assertEquals( "another value", map.get( "comp 1.var1" ));
	Assert.assertEquals( "value2", map.get( "comp 1.var2" ));
}