@Test
public void testFixOverriddenExports() {

	Component comp = new Component("comp");
	comp.addExportedVariable( new ExportedVariable( "comp.export1", "c1" ));
	comp.addExportedVariable( new ExportedVariable( "comp.export2", "c2" ));
	comp.addExportedVariable( new ExportedVariable( "comp.export3", "c3" ));
	Instance inst = new Instance("inst").component(comp);
	Assert.assertEquals( 0, inst.overriddenExports.size());
	InstanceHelpers.fixOverriddenExports(inst);
	Assert.assertEquals( 0, inst.overriddenExports.size());
	inst.overriddenExports.put( "inst.export1", "i1" ); // New (instance export)
	inst.overriddenExports.put( "comp.export2", "c2" ); // Unchanged component export
	inst.overriddenExports.put( "comp.export3", "i3" ); // Overridden component export
	InstanceHelpers.fixOverriddenExports(inst);
	// Check component exports (no change expected).
	Assert.assertEquals( 3, comp.exportedVariables.size());
	Assert.assertEquals( "c1", comp.exportedVariables.get("comp.export1").getValue());
	Assert.assertEquals( "c2", comp.exportedVariables.get("comp.export2").getValue());
	Assert.assertEquals( "c3", comp.exportedVariables.get("comp.export3").getValue());
	// Check instance overridden exports
	// exports 1 and 3 should remain unchanged, export 2 should have disappeared!
	Assert.assertEquals( 2, inst.overriddenExports.size());
	Assert.assertEquals( "i1", inst.overriddenExports.get("inst.export1"));
	Assert.assertEquals( "i3", inst.overriddenExports.get("comp.export3"));
}