And why are you doing a put? Because that causes a map entry to be created anyway.

I would expect this test only to do something with locks. Also I would expect that if a non existing key is unlocked, the entry is removed from map.