@Test
public void testUnbindApplication_success_withoutNotification() throws Exception {

	TestApplication app1 = new TestApplication();
	app1.setDirectory( this.folder.newFolder());
	app1.getTemplate().setExternalExportsPrefix( "prefix1" );
	ManagedApplication ma1 = new ManagedApplication( app1 );
	TestManagerWrapper.addManagedApplication( this.mngr, ma1 );
	TestApplication app2 = new TestApplication();
	app2.getTemplate().setName( "tpl-other" );
	app2.getTemplate().setExternalExportsPrefix( "tpl-other-prefix" );
	app2.getTemplate().setExternalExportsPrefix( "prefix2" );
	app2.setName( "app-other" );
	// Rename root instances in the second application.
	// This is to make sure messages are sent to the right instances in the right application.
	app2.getMySqlVm().setName( "other-mysql" );
	app2.getTomcatVm().setName( "other-tomcat" );
	app2.setDirectory( this.folder.newFolder());
	ManagedApplication ma2 = new ManagedApplication( app2 );
	TestManagerWrapper.addManagedApplication( this.mngr, ma2 );
	Assert.assertEquals( 0, ma1.getApplication().getApplicationBindings().size());
	String eep = ma2.getApplication().getTemplate().getExternalExportsPrefix();
	// Unbind an application that is not bound
	this.mngr.bindOrUnbindApplication( ma1, eep, ma2.getName(), false );
	// Nothing changed
	Assert.assertEquals( 0, ma1.getApplication().getApplicationBindings().size());
	// No message should have been sent when we tried to unbind
	Mockito.verifyZeroInteractions( this.messagingMngr );
}