Add unit tests for setting validation