@Override
  public void setParentJobMeta( JobMeta parentJobMeta ) {
    JobMeta previous = getParentJobMeta();
    super.setParentJobMeta( parentJobMeta );
    if ( previous != null ) {
      previous.removeCurrentDirectoryChangedListener( this.dirListener );
    }
    if ( parentJobMeta !=  null ) {
      parentJobMeta.addCurrentDirectoryChangedListener( this.dirListener );
    }
  }
@Test
  public void testCurrDirListener() throws Exception {
    try ( MockedConstruction<JobMeta> jobMetaMockedConstruction = mockConstruction( JobMeta.class );
          MockedConstruction<CurrentDirectoryResolver> currentDirectoryResolverMockedConstruction = mockConstruction(
            CurrentDirectoryResolver.class, ( mock, context ) ->
            {
              doCallRealMethod().when( mock ).normalizeSlashes( anyString() );
              doReturn( space ).when( mock ).resolveCurrentDirectory( any( ObjectLocationSpecificationMethod.class ),
                any( VariableSpace.class ), nullable( Repository.class ), nullable( Job.class ), anyString() );
            } ) ) {
      JobMeta meta = mock( JobMeta.class );
      JobEntryJob jej = getJej();
      jej.setParentJobMeta( null );
      jej.setParentJobMeta( meta );
      jej.setParentJobMeta( null );
      verify( meta, times( 1 ) ).addCurrentDirectoryChangedListener( any() );
      verify( meta, times( 1 ) ).removeCurrentDirectoryChangedListener( any() );
    }
  }