@Test
public void testExecutionInError() throws Exception {

	Mockito
		.doThrow( new CommandException( "For test" ))
		.when( this.commandMngr ).execute( Mockito.any( Application.class ), Mockito.anyString(), Mockito.anyInt(), Mockito.anyString());
	CommandExecutionJob job = new CommandExecutionJob();
	job.execute( this.context );
	Mockito.verify( this.context, Mockito.times( 1 )).getScheduler();
	Mockito.verify( this.context, Mockito.times( 3 )).getJobDetail();
	Mockito.verify( this.manager, Mockito.times( 1 )).applicationMngr();
	Mockito.verify( this.commandMngr, Mockito.times( 1 )).execute( null, "cmd", CommandHistoryItem.ORIGIN_SCHEDULER, "job" );
}