'Configure L{twisted.python.components.registerAdapter} to mutate an
alternate registry to improve test isolation.'

def setUp(self):

    scratchRegistry = AdapterRegistry()
    self.patch(components, 'globalRegistry', scratchRegistry)
    hook = _addHook(scratchRegistry)
    self.addCleanup(_removeHook, hook)
