'When L{ClientService} is restarted after having been connected, it
waits to start connecting until after having disconnected.'

def test_startServiceWaitsForDisconnect(self):

    (cq, service) = self.makeReconnector()
    d = service.stopService()
    self.assertNoResult(d)
    protocol = cq.constructedProtocols[0]
    self.assertEqual(protocol.transport.disconnecting, True)
    service.startService()
    self.assertNoResult(d)
    self.assertEqual(len(cq.constructedProtocols), 1)
    protocol.connectionLost(Failure(Exception()))
    self.assertEqual(len(cq.constructedProtocols), 2)
