### Question:
MarkdownConverter { public static String convert(String html) { if(!StringUtils.isTagOutsideOfBackticks(html)) { return unescapeXml(html); } return unescapeJava(remark.convert(html)); } private  MarkdownConverter(); static String convert(String html);  }### Answer:
@Test public void testHTMLConversion() { assertEquals("This is `my code`", convert("This is <code>my code</code>")); assertEquals("This is" + System.lineSeparator() + "**bold**", convert("This is<br><b>bold</b>")); assertEquals("The `<project>` element is the root of the descriptor.", convert("The <code>&lt;project&gt;</code> element is the root of the descriptor.")); assertEquals("# Hey Man #", convert("<h1>Hey Man</h1>")); assertEquals("[Placeholder](https: String htmlList = "<ul>" + System.lineSeparator() + " <li>Coffee</li>" + System.lineSeparator() + " <li>Tea</li>" + System.lineSeparator() + " <li>Milk</li>" + System.lineSeparator() + "</ul>"; String expectedList = " * Coffee" + System.lineSeparator() + " * Tea" + System.lineSeparator() + " * Milk"; assertEquals(expectedList, convert(htmlList)); assertEquals("ONLY_THIS_TEXT", convert("<p>ONLY_THIS_TEXT</p>")); String multilineHTML = "multi" + System.lineSeparator() + "line" + System.lineSeparator() + "<code>HTML</code>" + System.lineSeparator() + "stuff"; assertEquals("multi line `HTML` stuff", convert(multilineHTML)); String multilineHTML2 = "<p>multi<p>" + System.lineSeparator() + "line" + System.lineSeparator() + "<code>HTML</code>" + System.lineSeparator() + "stuff"; String multilineHTML2Expected = "multi" + System.lineSeparator() + "" + System.lineSeparator() + "line `HTML` stuff"; assertEquals(multilineHTML2Expected, convert(multilineHTML2)); }
@Test public void testMarkdownConversion() { assertEquals("This is `my code`", convert("This is `my code`")); assertEquals("The `<thing>` element is the root of the descriptor.", convert("The `<thing>` element is the root of the descriptor.")); assertEquals("The `<project>` element is the root of the descriptor.", convert("The `&lt;project&gt;` element is the root of the descriptor.")); }