def testStreamingInputCallFutureCancelled(self):
        self._protoc()

        with _CreateService(self._payload_pb2, self._responses_pb2,
                            self._service_pb2) as (methods, stub):
            with methods.pause():
                response_future = stub.StreamingInputCall.future(
                    _streaming_input_request_iterator(self._payload_pb2,
                                                      self._requests_pb2),
                    test_constants.LONG_TIMEOUT)
                response_future.cancel()
                self.assertTrue(response_future.cancelled())
            with self.assertRaises(future.CancelledError):
                response_future.result()