BrushOptionsPreferences { public void applyBrushSizePercentage(int percentage) { sharedPreferences.edit().putInt(PREF_BRUSH_SIZE, percentage).apply(); } protected  BrushOptionsPreferences(SharedPreferences sharedPreferences); static BrushOptionsPreferences newInstance(); void applyBrushSizePercentage(int percentage); int getBrushSizePercentage(); void applyBrushColor(BrushColor color); BrushColor getBrushColor(); int getBranchColor(); int getLeafColor();  }
@Test public void testThatApplyBrushSizePutsValuesInEditor() { brushOptionsPreferences.applyBrushSizePercentage(ANY_PERCENTAGE); verify(editor).putInt(PREF_BRUSH_SIZE, ANY_PERCENTAGE); }
@Test public void testThatApplyBrushSizeAppliesChanges() { brushOptionsPreferences.applyBrushSizePercentage(ANY_PERCENTAGE); verify(editor).apply(); }
@Test public void testThatApplyBrushColorAppliesChanges() { brushOptionsPreferences.applyBrushSizePercentage(ANY_PERCENTAGE); verify(editor).apply(); }