Mockable SharedPref classes

See #774