### Question:
HtmlHelper { public static int countTagLength(String taggedText) { int totalTagLength = 0; Pattern pattern = Pattern.compile("<(.*?)>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(taggedText); while (matcher.find()) { totalTagLength += matcher.group(1).length() + 2; } return totalTagLength; } 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 testCountTagLength() { assertEquals(0, HtmlHelper.countTagLength("iphone 4")); assertEquals(15, HtmlHelper.countTagLength("<phone>iphone 4</Phone>")); assertEquals(20, HtmlHelper.countTagLength("everybody is <b>here<br /></b> to do some <p>work</p>")); }