@Test
public void testHandleEvent_withContext_withRule_negativeMaxVmNumber() throws Exception {

	Mockito.when( this.preferencesMngr.get( Mockito.anyString(), Mockito.anyString())).thenReturn( "-1" );
	ManagedApplication ma = factorizeConfiguration();
	this.autonomicMngr.handleEvent( ma, new MsgNotifAutonomic( "app", "/root", "event", null ));
	ArgumentCaptor<CommandExecutionContext> execCtx = ArgumentCaptor.forClass( CommandExecutionContext.class );
	Mockito.verify( this.commandsMngr, Mockito.times( 3 )).execute(
			Mockito.any( Application.class ),
			Mockito.anyString(),
			execCtx.capture(),
			Mockito.anyInt(),
			Mockito.anyString());
	for( CommandExecutionContext c : execCtx.getAllValues()) {
		Assert.assertEquals( Integer.MAX_VALUE, c.getMaxVm());
		Assert.assertFalse( c.isStrictMaxVm());
	}
}