### Question:
ExternalResourceCache { protected String getUniqueId( final StepMeta meta ) { if ( meta == null || meta.getParentTransMeta() == null ) { return null; } final TransMeta transMeta = meta.getParentTransMeta(); if ( transMeta.getRepository() == null ) { String transName = transMeta.getFilename() == null ? transMeta.getName() : transMeta.getFilename(); return KettleAnalyzerUtil.normalizeFilePathSafely( transName ) + "::" + meta.getName(); } else { return transMeta.getPathAndName() + "." + transMeta.getDefaultExtension() + "::" + meta.getName(); } } private  ExternalResourceCache(); protected  ExternalResourceCache( IMetaverseConfig config ); static ExternalResourceCache getInstance(); void removeCachedResources( final Trans trans ); Resources<IExternalResourceInfo> get( final BaseStepMeta meta ); void cache( final BaseStepMeta meta, final ExternalResourceValues resources ); @Override String toString(); ExternalResourceValues newExternalResourceValues();  }### Answer:
@Test public void test_getUniqueId() { assertNull( testInstance.getUniqueId( null ) ); assertNull( testInstance.getUniqueId( meta1.getParentStepMeta() ) ); initMetas(); assertEquals( System.getProperty( "user.dir" ) + File.separator + "my_file::test", testInstance.getUniqueId( meta1.getParentStepMeta() ) ); when( transMeta.getRepository() ).thenReturn( Mockito.mock( Repository.class ) ); assertEquals( "null.null::test", testInstance.getUniqueId( meta1.getParentStepMeta() ) ); when( transMeta.getPathAndName() ).thenReturn( "path_and_name" ); when( transMeta.getDefaultExtension() ).thenReturn( "ktr" ); assertEquals( "path_and_name.ktr::test", testInstance.getUniqueId( meta1.getParentStepMeta() ) ); }