* Tests of the SoftValueHashMap
* @throws Exception
*/
public void testSoftValueHashMap() throws Exception
{
SoftValueHashMap map = new SoftValueHashMap();
for(int n = 0; n < 1000; n ++)
{
String key = "Key#"+n;
String value = "Value#"+n;
map.put(key, value);
}
assertEquals("Size == 1000", 1000, map.size());
forceSoftRefCollection();
assertEquals("Size == 0 after gc", 0, map.size());
}