### Question:
ColorUtilities { public static Color lighten(Color color) { float[] hsb = new float[3]; Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsb); hsb[1] = hsb[1] / 2; return new Color(Color.HSBtoRGB(hsb[0], hsb[1], hsb[2])); } private  ColorUtilities(); static Color blendColors(Color color1, Color color2); static Color brighten(Color input, double factor); static Color convertFromColorString(String color); static Color convertFromHexString(String color, int redIndex, int greenIndex, int blueIndex); static Color convertFromHexString(String color, int redIndex, int greenIndex, int blueIndex, int alphaIndex); static String convertToHexString(Color color, int redIndex, int greenIndex, int blueIndex); static String convertToHexString(Color color, int redIndex, int greenIndex, int blueIndex, int alphaIndex); static String convertToRGBAColorString(Color aColor); static Color darken(Color input, double factor); static Color lighten(Color color); static int getBrightness(Color color); static Color getContrastingColor(Color color); static Color getAlternateColor(Color color, int shift); static boolean isEqual(Color c1, Color c2); static boolean isEqualIgnoreAlpha(Color c1, Color c2); static Color opacitizeColor(Color startingColor, float alpha); static Color opacitizeColor(Color startingColor, int alpha); static final int COLOR_COMPONENT_MAX_VALUE; }### Answer:
@Test public void testLighten() { float[] originalHSB = new float[3]; Color.RGBtoHSB(Color.BLUE.getRed(), Color.BLUE.getGreen(), Color.BLUE.getBlue(), originalHSB); Color light1 = ColorUtilities.lighten(Color.BLUE); float[] light1HSB = new float[3]; Color.RGBtoHSB(light1.getRed(), light1.getGreen(), light1.getBlue(), light1HSB); Color light2 = ColorUtilities.lighten(light1); float[] light2HSB = new float[3]; Color.RGBtoHSB(light2.getRed(), light2.getGreen(), light2.getBlue(), light2HSB); Color light3 = ColorUtilities.lighten(light2); float[] light3HSB = new float[3]; Color.RGBtoHSB(light3.getRed(), light3.getGreen(), light3.getBlue(), light3HSB); Color light4 = ColorUtilities.lighten(light3); float[] light4HSB = new float[3]; Color.RGBtoHSB(light4.getRed(), light4.getGreen(), light4.getBlue(), light4HSB); Color light5 = ColorUtilities.lighten(light4); float[] light5HSB = new float[3]; Color.RGBtoHSB(light5.getRed(), light5.getGreen(), light5.getBlue(), light5HSB); Assert.assertEquals(light1HSB[0], originalHSB[0], 0); Assert.assertEquals(light1HSB[1], .5, 0.01); Assert.assertEquals(light1HSB[2], originalHSB[2], 0); Assert.assertEquals(light2HSB[0], originalHSB[0], 0); Assert.assertEquals(light2HSB[1], .25, 0.01); Assert.assertEquals(light2HSB[2], originalHSB[2], 0); Assert.assertEquals(light3HSB[0], originalHSB[0], 0); Assert.assertEquals(light3HSB[1], .125, 0.01); Assert.assertEquals(light3HSB[2], originalHSB[2], 0); Assert.assertEquals(light4HSB[0], originalHSB[0], 0); Assert.assertEquals(light4HSB[1], .0625, 0.01); Assert.assertEquals(light4HSB[2], originalHSB[2], 0); Assert.assertEquals(light5HSB[0], originalHSB[0], 0); Assert.assertEquals(light5HSB[1], .03125, 0.01); Assert.assertEquals(light5HSB[2], originalHSB[2], 0); }