Fix shared core tests

Quentin Arguillere
2022-01-28T11:05:52Z

Fix a case where a notification observer could be added and never removed, leading to crash in the test suite (and possibly in other situations). Also fix a test that was checking on a wrong condition in its assert.