[Pranav] Added mock test for asserting the calling of defer_stage1()