def METHOD_NAME(self):
    d = misc.cancelAfter(10, self.d, self.reactor)
    self.assertIdentical(d, self.d)
    @d.addCallback
    def check(r):
        self.assertEqual(r, "result")
    self.assertFalse(d.called)
    self.d.callback("result")
    self.assertTrue(d.called)