'Stopping the service closes all connections.'

def test_stop_service_connections(self):

    service = build_control_amp_service(self)
    service.startService()
    connections = [ControlAMP(Clock(), service) for _ in range(3)]
    initial_disconnecting = []
    for c in connections:
        c.makeConnection(StringTransportWithAbort())
        initial_disconnecting.append(c.transport.disconnecting)
    service.stopService()
    self.assertEqual((initial_disconnecting, [c.transport.disconnecting for c in connections]), (([False] * 3), ([True] * 3)))
