### Question:
ExternalResourceCache { public static ExternalResourceCache getInstance() { if ( INSTANCE == null ) { synchronized ( ExternalResourceCache.class ) { if ( INSTANCE == null ) { INSTANCE = new ExternalResourceCache(); } } } return INSTANCE; } 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_getInstance() { assertNotNull( ExternalResourceCache.getInstance() ); assertEquals( ExternalResourceCache.getInstance(), ExternalResourceCache.getInstance() ); }
@Test public void test_ExternalResourceExternalResourceValues() { final IExternalResourceInfo resource1 = Mockito.mock( IExternalResourceInfo.class ); final IExternalResourceInfo resource2 = Mockito.mock( IExternalResourceInfo.class ); final ExternalResourceCache.Resources resourceValues = ExternalResourceCache.getInstance().new ExternalResourceValues(); assertEquals( 0, resourceValues.size() ); resourceValues.add( resource1 ); assertEquals( 1, resourceValues.size() ); assertTrue( resourceValues.contains( resource1 ) ); resourceValues.add( resource2 ); assertEquals( 2, resourceValues.size() ); assertTrue( resourceValues.contains( resource2 ) ); resourceValues.remove( resource1 ); assertEquals( 1, resourceValues.size() ); assertFalse( resourceValues.contains( resource1 ) ); assertTrue( resourceValues.contains( resource2 ) ); resourceValues.remove( resource2 ); assertEquals( 0, resourceValues.size() ); assertFalse( resourceValues.getInternal() == resourceValues.getInternal() ); }