### Question:
HtmlHelper { public static String htmlToReadableText(String htmlString) { htmlString = HTML_TO_READABLE_TEXT.matcher(htmlString).replaceAll("\n"); htmlString = HTML_TO_READABLE_TEXT2.matcher(htmlString).replaceAll("\n\n"); htmlString = stripHtmlTags(htmlString); return htmlString.trim(); } private  HtmlHelper(); static int countTags(String htmlText); static int countTagLength(String taggedText); static int countTags(String htmlText, boolean distinct); static String stripHtmlTags(String htmlText); static String stripHtmlTags(String htmlText, String replacement); @Deprecated static String stripHtmlTags(String htmlText, Set<HtmlElement> htmlElements); static String stripHtmlTags(String htmlText, HtmlElement... htmlElements); static String joinTagsAndRemoveNewLines(String htmlText); static String removeConcreteHtmlTag(String pageString, String tag); static String removeConcreteHtmlTag(String pageContent, String beginTag, String endTag); static List<String> getConcreteTags(String pageString, String tag); static List<String> getConcreteTags(String pageString, String beginTag, String endTag); static String documentToReadableText(Node node); static String htmlToReadableText(String htmlString); static String extractTagElement(final String pattern, final String content, final String removeTerm); static boolean isSimpleElement(Node node); static boolean isHeadlineTag(String tag); static boolean isHeadlineTag(Node tag); static Node removeWhitespace(Node node); static boolean writeToFile(Node node, File file); static String getInnerXml(Node node); static Document createDocument(); static void removeAll(Node node, short nodeType); static void removeAll(Node node, short nodeType, String name); static Document cloneDocument(Document document); static String xmlToString(Node node, boolean omitXmlDeclaration); static String xmlToString(Node node); static void printDom(Node node); static String documentToText(Node node); static Set<String> getLinks(Document document, boolean inDomain, boolean outDomain, String prefix); static Set<String> getLinks(Document document, boolean inDomain, boolean outDomain, boolean subDomain); static Set<String> getLinks(Document document, boolean inDomain, boolean outDomain, String prefix, boolean respectNoFollow, boolean includeSubdomains); static Set<String> getLinks(Document document, String originalDocumentUrl, boolean inDomain, boolean outDomain, String prefix, boolean respectNoFollow, boolean includeSubdomains); static Set<String> getLinks(Document document, boolean inDomain, boolean outDomain); static String getDocumentTextDump(Document document); static List<Node> getAllSiblings(Node node);  }### Answer:
@Test public void testHtmlToReadableText() { String s = "Event: Dropkick Murphys<br>Venue: Aragon Ballroom<br>Start: 2/22/2013 7:00:00 PM<br>Category: CONCERTS ALTERNATIVE"; assertEquals(4, HtmlHelper.htmlToReadableText(s).split("\n").length); s = "<p class=\"standfirst\">David Cameron describes dismissal of claims that EU law gives prisoners right to vote as 'a great victory for common sense'</p><p>Two convicted murderers who argued that European Union law gave them the right to vote in UK elections have had their appeals dismissed by the supreme court at Westminster.</p>"; assertEquals(2, HtmlHelper.htmlToReadableText(s).split("\n\n").length); s = "<li><b><a href=\"http: assertEquals(6, HtmlHelper.htmlToReadableText(s).split("\n").length); }