@Deprecated
  public TransMeta getTransMeta( Repository rep, VariableSpace space ) throws KettleException {
    return getTransMeta( rep, null, space );
  }
@Test
  public void testGetTransMeta() throws KettleException {
    String param1 = "param1";
    String param2 = "param2";
    String param3 = "param3";
    String parentValue1 = "parentValue1";
    String parentValue2 = "parentValue2";
    String childValue3 = "childValue3";

    JobEntryTrans jobEntryTrans = spy( getJobEntryTrans() );
    JobMeta parentJobMeta = spy( new JobMeta() );
    when( parentJobMeta.getNamedClusterEmbedManager() ).thenReturn( mock( NamedClusterEmbedManager.class ) );
    jobEntryTrans.setParentJobMeta( parentJobMeta);

    Repository rep = Mockito.mock( Repository.class );
    RepositoryDirectory repositoryDirectory = Mockito.mock( RepositoryDirectory.class );
    RepositoryDirectoryInterface repositoryDirectoryInterface = Mockito.mock( RepositoryDirectoryInterface.class );
    Mockito.doReturn( repositoryDirectoryInterface ).when( rep ).loadRepositoryDirectoryTree();
    Mockito.doReturn( repositoryDirectory ).when( repositoryDirectoryInterface ).findDirectory( "/home/admin" );

    TransMeta meta = new TransMeta();
    meta.setVariable( param2, "childValue2 should be override" );
    meta.setVariable( param3, childValue3 );

    Mockito.doReturn( meta ).when( rep )
      .loadTransformation( Mockito.eq( "test.ktr" ), Mockito.any(), Mockito.any(), Mockito.anyBoolean(),
        Mockito.any() );

    VariableSpace parentSpace = new Variables();
    parentSpace.setVariable( param1, parentValue1 );
    parentSpace.setVariable( param2, parentValue2 );

    jobEntryTrans.setFileName( "/home/admin/test.ktr" );

    Mockito.doNothing().when( jobEntryTrans ).logBasic( Mockito.anyString() );
    jobEntryTrans.setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME );

    TransMeta transMeta;
    jobEntryTrans.setPassingAllParameters( false );
    transMeta = jobEntryTrans.getTransMeta( rep, null, parentSpace );
    Assert.assertEquals( null, transMeta.getVariable( param1 ) );
    Assert.assertEquals( parentValue2, transMeta.getVariable( param2 ) );
    Assert.assertEquals( childValue3, transMeta.getVariable( param3 ) );

    jobEntryTrans.setPassingAllParameters( true );
    transMeta = jobEntryTrans.getTransMeta( rep, null, parentSpace );
    Assert.assertEquals( parentValue1, transMeta.getVariable( param1 ) );
    Assert.assertEquals( parentValue2, transMeta.getVariable( param2 ) );
    Assert.assertEquals( childValue3, transMeta.getVariable( param3 ) );
  }