@Test( expected = IOException.class )
public void testLoadApplicationTemplate_externalExportsPrefixIsAlreadyUsed() throws Exception {

	// We need to modify the descriptor, so work on a copy
	File originalDirectory = TestUtils.findApplicationDirectory( "lamp" );
	Assert.assertTrue( originalDirectory.exists());
	File directoryCopy = this.folder.newFolder();
	Utils.copyDirectory( originalDirectory, directoryCopy );
	// Update the external export ID
	File descriptorFile = new File( directoryCopy, Constants.PROJECT_DIR_DESC + "/" + Constants.PROJECT_FILE_DESCRIPTOR );
	Assert.assertTrue( descriptorFile.exists());
	ApplicationTemplateDescriptor desc = ApplicationTemplateDescriptor.load( descriptorFile );
	desc.setExternalExportsPrefix( "for-test" );
	ApplicationTemplateDescriptor.save( descriptorFile, desc );
	try {
		this.mngr.loadApplicationTemplate( directoryCopy );
	} catch( Exception e ) {
		Assert.fail( "Loading the application the first time should not fail." );
	}
	// Change the qualifier in the files
	desc.setVersion( "33.2" );
	ApplicationTemplateDescriptor.save( descriptorFile, desc );
	this.mngr.loadApplicationTemplate( directoryCopy );
}