### Question:
PrettySharedPreferences { protected StringEditor getStringEditor(String key) { TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key); if (typeEditor == null) { typeEditor = new StringEditor(this, sharedPreferences, key); TYPE_EDITOR_MAP.put(key, typeEditor); } else if (!(typeEditor instanceof StringEditor)) { throw new IllegalArgumentException(String.format("key %s is already used for other type", key)); } return (StringEditor) typeEditor; } PrettySharedPreferences(SharedPreferences sharedPreferences); T clear(); T discard(); @TargetApi(Build.VERSION_CODES.GINGERBREAD) void apply(); boolean commit();  }### Answer:
@Test public void testGetStringEditor() throws Exception { StringEditor stringEditor = mSharedPref.getStringEditor(TEST_KEY); assertThat(stringEditor).isInstanceOf(StringEditor.class); }
@Test public void testGetStringEditorWithSameKey() throws Exception { StringEditor stringEditor = mSharedPref.getStringEditor(TEST_KEY); assertThat(stringEditor).isInstanceOf(StringEditor.class); StringEditor stringEditor1 = mSharedPref.getStringEditor(TEST_KEY); assertThat(stringEditor1).isEqualTo(stringEditor); }