### Question:
ColorUtils { public static String toRGBCode(final Color color) { return String.format("#%02X%02X%02X", (int) (color.getRed() * 255), (int) (color.getGreen() * 255), (int) (color.getBlue() * 255)); } private  ColorUtils(); static java.awt.Color toAwtColor(final Color fxColor); static Color toFxColor(final java.awt.Color awtColor); static String toRGBCode(final Color color);  }### Answer:
@Test public void testToRGBCode() { assertEquals("#000000", ColorUtils.toRGBCode(Color.BLACK)); assertEquals("#FFFFFF", ColorUtils.toRGBCode(Color.WHITE)); assertEquals("#0A0B0C", ColorUtils.toRGBCode(Color.web("#0a0b0c"))); }