'Although somewhat obscure, L{IProtocolFactory} includes both C{doStart}
and C{doStop} methods; ensure that when these methods are called on the
factory that was passed to the reactor, the factory that was passed
from the application receives them.'

def test_startStopFactory(self):

    (cq, service) = self.makeReconnector()
    firstAppFactory = cq.applicationFactory
    self.assertEqual(firstAppFactory.numPorts, 0)
    firstPassedFactory = cq.passedFactories[0]
    firstPassedFactory.doStart()
    self.assertEqual(firstAppFactory.numPorts, 1)
