'L{IConsumer} providers can be adapted to L{IProtocol} providers using
L{ProtocolToConsumerAdapter}.'

def test_consumerToProtocol(self):

    result = []
    @implementer(IConsumer)
    class Consumer(object, ):
        def write(self, d):
            result.append(d)
    c = Consumer()
    protocol = IProtocol(c)
    protocol.dataReceived('hello')
    self.assertEqual(result, ['hello'])
    self.assertIsInstance(protocol, ConsumerToProtocolAdapter)
