Updated the method to verify system notifications and added new tests for media notifications (#9330)