Code to test WeakHashMap behaviour