'L{wrapPRocessProtocol}, when passed a L{Protocol} should return
something that follows the L{IProcessProtocol} interface, with
connectionMade() mapping to connectionMade(), outReceived() mapping to
dataReceived() and processEnded() mapping to connectionLost().'

def test_wrapProcessProtocol_Protocol(self):

    protocol = MockProtocol()
    protocol.transport = StubTransport()
    process_protocol = session.wrapProcessProtocol(protocol)
    process_protocol.connectionMade()
    process_protocol.outReceived('data')
    self.assertEqual(protocol.transport.buf, 'data~')
    process_protocol.processEnded(failure.Failure(error.ProcessTerminated(0, None, None)))
    protocol.reason.trap(error.ProcessTerminated)
