### Question:
HTMLUtilities { public static String toHexString(Color color) { int r = color.getRed(); int g = color.getGreen(); int b = color.getBlue(); StringBuilder buffy = new StringBuilder("#"); buffy.append(StringUtilities.pad(Integer.toHexString(r), '0', 2)); buffy.append(StringUtilities.pad(Integer.toHexString(g), '0', 2)); buffy.append(StringUtilities.pad(Integer.toHexString(b), '0', 2)); return buffy.toString().toUpperCase(); }  static String wrapAsHTML(String text); static String colorString(Color color, String text); static String colorString(String rgbColor, String text); static String colorString(String rgbColor, int value); static String spaces(int num); static String bold(String text); static String underline(String text); static String italic(String text); static boolean isHTML(String text); static String setFontSize(String text, int ptSize); static String setFont(String text, Color color, int ptSize); static String wrapWithLinkPlaceholder(String htmlText, String content); static String convertLinkPlaceholdersToHyperlinks(String text); static String toHTML(String text); static String toWrappedHTML(String text); static String toWrappedHTML(String text, int maxLineLength); static String toLiteralHTMLForTooltip(String text); static String friendlyEncodeHTML(String text); static String escapeHTML(String text); static boolean charNeedsHTMLEscaping(int codePoint); static String toLiteralHTML(String text, int maxLineLength); static String lineWrapWithHTMLLineBreaks(String text); static String lineWrapWithHTMLLineBreaks(String text, int maxLineLength); static String fromHTML(String text); static String toRGBString(Color color); static String toHexString(Color color); static final String HTML; static final String HTML_CLOSE; static final String BR; static final String PRE; static final String PRE_CLOSE; static final String LINK_PLACEHOLDER_OPEN; static final String LINK_PLACEHOLDER_CLOSE; static String HTML_SPACE; static String HTML_NEW_LINE; static final String MAROON; static final String GREEN; static final String BLUE; static final String PURPLE; static final String DARK_CYAN; static final String OLIVE; static final String ORANGE; static final String PINK; static final String YELLOW; static final String GRAY; }### Answer:
@Test public void testToHexString() { String rgb = HTMLUtilities.toHexString(Color.RED); assertEquals("#FF0000", rgb); }