Added preferences unit tests

--HG--
extra : rebase_source : 6c133eeae2bbfe86b862077c335d9e6d11943ebe