ColorUtils { public boolean colorSimilarCheck(int color1, int color2) { double colorDiff = Math.sqrt( Math.pow(Color.red(color1) - Color.red(color2), 2) + Math.pow(Color.green(color1) - Color.green(color2), 2) + Math.pow(Color.blue(color1) - Color.blue(color2), 2) ); return colorDiff < COLOR_DIFF_THRESHOLD; } private  ColorUtils(); static ColorUtils getInstance(); boolean colorSimilarCheck(int color1, int color2);  }
@Test public void colorSimilarCheck() { ColorUtils colorUtils = ColorUtils.getInstance(); Assert.assertEquals( mIsColorSimilar, colorUtils.colorSimilarCheck(mColor1, mColor2) ); }