Added tests
Added a shutdown test