Move shutdown-related tests into a new module