def __preroll(self, *arg, **argd):
        Axon.Scheduler.scheduler.run = Axon.Scheduler.scheduler()
        normaliser = directionNormaliser(*arg, **argd).activate()

        target = Axon.Component.component().activate()

        normaliser.link((normaliser, "outbox"), (target, "inbox"))
        normaliser.link((normaliser, "signal"), (target, "control"))
        execute = Axon.Scheduler.scheduler.run.main()

        return normaliser, target, execute
    def test_shutdown(self):
        """Shuts down in response to a shutdownMicroprocess message"""

        for msg in [producerFinished(self), shutdownMicroprocess(self)]:
            normaliser = directionNormaliser().activate()

            for _ in xrange(0, 10):
                normaliser.next()
            self.assert_(0 == len(normaliser.outboxes["outbox"]))
            self.assert_(0 == len(normaliser.outboxes["signal"]))

            normaliser._deliver(msg, "control")
            try:
                for _ in xrange(0, 10):
                    normaliser.next()
                self.fail()
            except StopIteration:
                pass
            self.assert_(0 == len(normaliser.outboxes["outbox"]))
            self.assert_(1 == len(normaliser.outboxes["signal"]))
            received = normaliser._collect("signal")
            self.assert_(msg == received)