@Test
public void testSetEnableCors() throws Exception {

	// No NPE
	this.register.setEnableCors( true );
	this.register.setEnableCors( false );
	// Act like if the component had been started
	this.register.app = Mockito.spy( new RestApplication( this.manager ));
	this.register.jerseyServlet = Mockito.mock( ServletContainer.class );
	this.register.setEnableCors( true );
	Mockito.verify( this.register.app, Mockito.times( 1 )).enableCors( true );
	Mockito.verify( this.register.jerseyServlet, Mockito.only()).reload();
	Mockito.reset( this.register.app );
	Mockito.reset( this.register.jerseyServlet );
	this.register.setEnableCors( false );
	Mockito.verify( this.register.app, Mockito.times( 1 )).enableCors( false );
	Mockito.verify( this.register.jerseyServlet, Mockito.only()).reload();
	// Stop...
	this.register.stopping();
	// No NPE
	this.register.setEnableCors( true );
	Assert.assertTrue( this.register.isCorsEnabled());
	this.register.setEnableCors( false );
	Assert.assertFalse( this.register.isCorsEnabled());
}