@Test
public void testExecute() throws Exception
{

    doReturn( commandProcess ).when( commandProcessor ).createCommandProcess( callback, request, HOST_ID );
    doThrow( new HostDisconnectedException( "" ) ).when( commandProcessor ).getResourceHostInfo( HOST_ID );
    try
    {
        commandProcessor.execute( request, callback );
        fail( "Expected CommandException" );
    }
    catch ( CommandException e )
    {
    }
    doReturn( resourceHostInfo ).when( commandProcessor ).getResourceHostInfo( HOST_ID );
    try
    {
        commandProcessor.execute( request, callback );
        fail( "Expected CommandException" );
    }
    catch ( CommandException e )
    {
    }
}