'L{Twist.startService} starts the service and registers a trigger to
stop the service when the reactor shuts down.'

def test_startService(self):

    options = Twist.options(['twist', 'web'])
    reactor = options['reactor']
    service = Twist.service(plugin=options.plugins[options.subCommand], options=options.subOptions)
    self.patchStartService()
    Twist.startService(reactor, service)
    self.assertEqual(self.serviceStarts, [service])
    self.assertEqual(reactor.triggers['before']['shutdown'], [(service.stopService, (), {})])
