BrushOptionsPreferences { public void applyBrushColor(BrushColor color) { sharedPreferences.edit().putInt(PREF_BRUSH_COLOR, color.color()).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 testThatApplyBrushColorPutsValuesInEditor() { brushOptionsPreferences.applyBrushColor(ANY_COLOR); verify(editor).putInt(PREF_BRUSH_COLOR, ANY_COLOR.color()); }