Returns an object that, while in scope, replaces whatever theAllocator was with TestAllocator.
See Implementation