Added test for early execution of @onExit