Taste { void commit(Object object) { save(editor(object), true); } Taste(SharedPreferences sp, String key, String[] defaultValue);   }
@Test public void testCommit() throws Exception { dummyTaste.setEditor(editor); dummyTaste = spy(dummyTaste); dummyTaste.commit("sample-value"); verify(dummyTaste).editor("sample-value"); verify(dummyTaste).save(editor, true); }