Revert "Fix bug in handleNotification function and improve test code coverage"