@Test
public void testAddImport() {

	Map<String,Collection<Import>> prefixToImports = new HashMap<String,Collection<Import>> ();
	prefixToImports.put( "comp", new ArrayList<Import>( Arrays.asList(
			new Import( "/root1", "comp1" ),
			new Import( "/root2", "comp1" ))));
	Instance inst = new Instance( "inst" );
	inst.getImports().putAll( prefixToImports );
	Assert.assertEquals( 1, inst.getImports().keySet().size());
	Assert.assertTrue( inst.getImports().keySet().contains( "comp" ));
	ImportHelpers.addImport( inst, "wow", new Import( "/root", "comp1" ));
	Assert.assertEquals( 2, inst.getImports().keySet().size());
	Assert.assertTrue( inst.getImports().keySet().contains( "comp" ));
	Assert.assertTrue( inst.getImports().keySet().contains( "wow" ));
	Assert.assertEquals( 2, inst.getImports().get( "comp" ).size());
	ImportHelpers.addImport( inst, "comp", new Import( "/root3", "comp1" ));
	Assert.assertEquals( 3, inst.getImports().get( "comp" ).size());
	Assert.assertEquals( 2, inst.getImports().keySet().size());
	// We cannot insert the same import twice
	ImportHelpers.addImport( inst, "comp", new Import( "/root3", "comp1" ));
	Assert.assertEquals( 3, inst.getImports().get( "comp" ).size());
	Assert.assertEquals( 2, inst.getImports().keySet().size());
}