Few fixes in tests, added tests for shutdown command