Add unit tests on Preferences; refs #454