### Question:
HTMLUtilities { public static String toLiteralHTML(String text, int maxLineLength) { String html = toHTMLWithLineWrappingAndEncoding(text, maxLineLength, true); return html; }  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 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 testToLiteralHTML() { String s = "I have <b>some <i>markup</i></b>."; String html = HTMLUtilities.toLiteralHTML(s, 0); assertEquals( HTML + "I&nbsp;have&nbsp;&lt;b&gt;some&nbsp;&lt;i&gt;markup&lt;/i&gt;&lt;/b&gt;.", html); }
@Test public void testToLiteralHTML_AlreadyStartingWithHTML() { String s = "<HTML>Wrap<BR>here"; String html = HTMLUtilities.toLiteralHTML(s, 4); assertEquals(HTML + "&lt;HTM<BR>\nL&gt;Wr<BR>\nap&lt;B<BR>\nR&gt;he<BR>\nre", html); }
@Test public void testToLiteralHTML_NoExisingHTML_SpecifiedLimit() { String s = "Wrap here"; String html = HTMLUtilities.toLiteralHTML(s, 4); assertEquals(HTML + "Wrap<BR>\n&nbsp;<BR>\nhere", html); }