Add region swapOut, beforeSwapOut

fixes #1718
`.to.have.been.calledOnce`