test($cordovaPreferences): add unit tests