BrushOptionsPreferences { public int getBranchColor() { int color = getBrushColor().color(); return Color.rgb((int) (Color.red(color) / DARKENING_FACTOR), (int) (Color.green(color) / DARKENING_FACTOR), (int) (Color.blue(color) / DARKENING_FACTOR)); } 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 testThatGetBranchColorReturnsGetsValueFromSharedPreferences() { brushOptionsPreferences.getBranchColor(); verify(sharedPreferences).getInt(eq(PREF_BRUSH_COLOR), anyInt()); }