@Test
public void testCancelCandidate() throws Exception {

	TestApplication app = new TestApplication();
	app.setName( "app" );
	TargetHandlerParameters parameters1 = new TargetHandlerParameters()
			.applicationName( app.getName())
			.scopedInstancePath( InstanceHelpers.computeInstancePath( app.getMySqlVm()))
			.domain( "domain" );
	TargetHandlerParameters parameters2 = new TargetHandlerParameters()
			.applicationName( app.getName())
			.scopedInstancePath( InstanceHelpers.computeInstancePath( app.getTomcatVm()))
			.domain( "domain" );
	this.targetConfigurator.reportCandidate( parameters1, app.getMySqlVm());
	Assert.assertEquals( 1, this.targetConfigurator.candidates.size());
	this.targetConfigurator.reportCandidate( parameters2, app.getTomcatVm());
	Assert.assertEquals( 2, this.targetConfigurator.candidates.size());
	this.targetConfigurator.cancelCandidate( parameters1, app.getMySqlVm());
	Assert.assertEquals( 1, this.targetConfigurator.candidates.size());
	this.targetConfigurator.cancelCandidate( parameters2, app.getTomcatVm());
	Assert.assertEquals( 0, this.targetConfigurator.candidates.size());
	this.targetConfigurator.cancelCandidate( parameters2, app.getTomcat());
	Assert.assertEquals( 0, this.targetConfigurator.candidates.size());
}