It's good practice to ensure that settings will be changed back even if the test fails. Put the reversion of settings in the finally of a try/finally block