### Question:
ImageDataManager { @Nullable public SizeInt getImageSize (@Nullable final IReadableResource aRes) { if (aRes == null) return null; m_aRWLock.readLock ().lock (); try { final SizeInt aData = m_aImageData.get (aRes); if (aData != null) { s_aStatsHdl.cacheHit (); return aData; } if (m_aNonExistingResources.contains (aRes)) { s_aStatsHdl.cacheHit (); return null; } } finally { m_aRWLock.readLock ().unlock (); } final SizeInt aData = _readImageData (aRes); m_aRWLock.writeLocked ( () -> { if (aData == null) m_aNonExistingResources.add (aRes); else m_aImageData.put (aRes, aData); s_aStatsHdl.cacheMiss (); }); return aData; } private  ImageDataManager(@Nonnegative final int nMaxCacheSize); static boolean isInstantiated(); @Nonnull static ImageDataManager getInstance(); @Nullable SizeInt getImageSize(@Nullable final IReadableResource aRes); @Nonnull EChange clearCachedSize(@Nullable final IReadableResource aRes); @Nonnull EChange clearCache(); @Nonnull @ReturnsMutableCopy ICommonsMap <IReadableResource, SizeInt> getAllCachedSizes(); @Nonnull @ReturnsMutableCopy ICommonsSet <IReadableResource> getAllNotExistingResources();  }### Answer:
@Test public void testGetImageSize () { assertNull (ImageDataManager.getInstance ().getImageSize (null)); ClassPathResource aRes = new ClassPathResource ("gfx/bullet_green.gif"); assertNotNull (ImageDataManager.getInstance ().getImageSize (aRes)); assertNotNull (ImageDataManager.getInstance ().getImageSize (aRes)); aRes = new ClassPathResource ("gfx/no-image.xml"); assertNull (ImageDataManager.getInstance ().getImageSize (aRes)); assertNull (ImageDataManager.getInstance ().getImageSize (aRes)); aRes = new ClassPathResource ("gfx/non_existing_file"); assertNull (ImageDataManager.getInstance ().getImageSize (aRes)); assertNull (ImageDataManager.getInstance ().getImageSize (aRes)); }