Add test for shutdown