Remove unnecessary code
Fixed to response error code
Fixed X-Notification-Id check
Add test cases