Added tests for prefs