'L{ProcessMonitor.stopService} should stop all monitored processes.'

def test_stopService(self):

    self.pm.addProcess('foo', ['foo'])
    self.pm.addProcess('bar', ['bar'])
    self.pm.startService()
    self.reactor.advance(self.pm.threshold)
    self.assertIn('foo', self.pm.protocols)
    self.assertIn('bar', self.pm.protocols)
    self.reactor.advance(1)
    self.pm.stopService()
    self.reactor.advance((self.pm.killTime + 1))
    self.assertEqual({}, self.pm.protocols)
