BAEL-672 proper image id

This commit is contained in:
Tomasz Lelek 2017-02-05 14:13:45 +01:00
parent c791bdf1dc
commit 0f59b0d533
1 changed files with 2 additions and 2 deletions

View File

@ -15,13 +15,13 @@ public class WeakHashMapTest {
public void givenWeakHashMap_whenCacheValueThatHasNoReferenceToIt_GCShouldReclaimThatObject() {
//given
WeakHashMap<UniqueImageName, BigImage> map = new WeakHashMap<>();
BigImage bigImage = new BigImage("foo");
BigImage bigImage = new BigImage("image_id");
UniqueImageName imageName = new UniqueImageName("name_of_big_image");
map.put(imageName, bigImage);
assertTrue(map.containsKey(imageName));
//when big image is not in use anymore
//when big image key is not reference anywhere
imageName = null;
System.gc();