@Override
  public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration,
                       AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException {
    DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration;
    if ( executionConfiguration instanceof TransExecutionConfiguration ) {
      configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration,
        variableSpace, meta, repository );
    }

    if ( executionConfiguration instanceof JobExecutionConfiguration ) {
      configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace,
        meta, repository );
    }

    variableSpace.setVariable( "engine", null );
    variableSpace.setVariable( "engine.remote", null );
    variableSpace.setVariable( "engine.scheme", null );
    variableSpace.setVariable( "engine.url", null );
  }
@Test
  public void testExecuteRemoteNotFoundJob() throws Exception {
    DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
    defaultRunConfiguration.setName( "Default Configuration" );
    defaultRunConfiguration.setLocal( false );
    defaultRunConfiguration.setRemote( true );
    defaultRunConfiguration.setServer( "Test Server" );

    JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();
    lenient().doReturn( slaveServer ).when( abstractMeta ).findSlaveServer( null );

    try {
      defaultRunConfigurationExecutor
        .execute( defaultRunConfiguration, jobExecutionConfiguration, abstractMeta, variableSpace, null );
      fail();
    } catch ( KettleException e ) {
      // expected
    }
  }