@Test( expected = UnauthorizedActionException.class )
public void testBindApplication_invalidTemplatePrefix() throws Exception {

	TestApplication app = new TestApplication();
	app.setDirectory( this.folder.newFolder());
	app.getTemplate().setExternalExportsPrefix( "prefix" );
	ManagedApplication ma1 = new ManagedApplication( app );
	TestManagerWrapper.addManagedApplication( this.mngr, ma1 );
	app = new TestApplication();
	app.setDirectory( this.folder.newFolder());
	ManagedApplication ma2 = new ManagedApplication( app );
	TestManagerWrapper.addManagedApplication( this.mngr, ma2 );
	// ma1 and ma2 do not have the same template name
	this.mngr.bindOrUnbindApplication( ma1, ma1.getApplication().getTemplate().getName(), ma2.getName(), true );
}