Assertions for SharedPreferences added.