protected void updateCurrentDir() {
    String prevCurrentDir = variables.getVariable( Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY );
    String currentDir = variables.getVariable(
      repository != null
          ? Const.INTERNAL_VARIABLE_JOB_REPOSITORY_DIRECTORY
          : filename != null
            ? Const.INTERNAL_VARIABLE_JOB_FILENAME_DIRECTORY
            : Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY );
    variables.setVariable( Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY, currentDir );
    fireCurrentDirectoryChanged( prevCurrentDir, currentDir );
  }
@Test
  public void testUpdateCurrentDirWithFilename( ) {
    JobMeta jobMetaTest = new JobMeta(  );
    jobMetaTest.setFilename( "hasFilename" );
    jobMetaTest.setVariable( Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY, "Original value defined at run execution" );
    jobMetaTest.setVariable( Const.INTERNAL_VARIABLE_JOB_FILENAME_DIRECTORY, "file:///C:/SomeFilenameDirectory" );
    jobMetaTest.setVariable( Const.INTERNAL_VARIABLE_JOB_REPOSITORY_DIRECTORY, "/SomeRepDirectory" );
    jobMetaTest.updateCurrentDir();

    assertEquals( "file:///C:/SomeFilenameDirectory", jobMetaTest.getVariable( Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY ) );

  }