Fixed preferences dialog unit test