Test for shutdown handler