refactoring test - assert_no_dangling_references()