Test for early execution of @onExit blocks

Had a look at the test suite and noticed this wasn't explicitly tested, so I added a little something.