def METHOD_NAME(self):
    headers = {
        "X-GoOG-CHANNEL-ID": "myid",
        "X-Goog-MESSAGE-NUMBER": "1",
        "X-Goog-rESOURCE-STATE": "sync",
        "X-Goog-reSOURCE-URI": "http://example.com/",
        "X-Goog-resOURCE-ID": "http://example.com/resource_1",
    }
    ch = channel.Channel(
        "web_hook",
        "myid",
        "mytoken",
        "http://example.org/callback",
        expiration=0,
        params={"extra": "info"},
        resource_id="the_resource_id",
        resource_uri="http://example.com/resource_1",
    )
    # Good test case.
    n = channel.notification_from_headers(ch, headers)
    self.assertEqual("http://example.com/resource_1", n.resource_id)
    self.assertEqual("http://example.com/", n.resource_uri)
    self.assertEqual("sync", n.state)
    self.assertEqual(1, n.message_number)
    # Detect id mismatch.
    ch.id = "different_id"
    try:
        n = channel.notification_from_headers(ch, headers)
        self.fail("Should have raised exception")
    except errors.InvalidNotificationError:
        pass
    # Set the id back to a correct value.
    ch.id = "myid"