Add test for unlinking after unlock()