### Question:
MathConverter extends
        AstVisitor<WtNode> { String wiki2Tex(String content) { content = subMatch.matcher(content).replaceAll("_{$1}") .replaceAll("[{<]sup[}>](.+?)[{<]/sup[}>]", "^{$1}") .replaceAll("'''(.+?)'''", "\\\\mathbf{$1}") .replaceAll("''(.+?)''", "\\\\mathit{$1}"); return UnicodeMap.string2TeX(content); } MathConverter(String wikiText, String name);  MathConverter(String wikiText);  MathConverter(String wikitext, String title, BaseConfig config); boolean isSkipHiddenMath(); void setSkipHiddenMath(boolean skipHiddenMath); List<WikidataLink> getLinks(); List<MathTag> getMathTags(); String getOutput(); String getStrippedOutput(); void visit(WtNode n); void visit(WtNodeList n); void visit(WtUnorderedList e); void visit(WtOrderedList e); void visit(WtListItem item); void visit(EngPage p); void visit(WtText text); void visit(WtWhitespace w); void visit(WtBold b); void visit(WtItalics i); void visit(WtXmlCharRef cr); void visit(WtXmlEntityRef er); void visit(WtUrl wtUrl); void visit(WtExternalLink link); void visit(WtInternalLink link); void visit(WtSection s); void visit(WtParagraph p); void visit(WtHorizontalRule hr); void visit(WtXmlElement e); void visit(WtImageLink n); void visit(WtIllegalCodePoint n); void visit(WtXmlComment n); void visit(WtTable b); void visit(WtTableRow b); void visit(WtTableCell b); void visit(WtTableImplicitTableBody b); void visit(WtTableHeader b); void visit(WtTableCaption b); void visit(WtNewline n); void visit(WtTemplate n); void visit(WtTemplateArgument n); void visit(WtTemplateParameter n); void visit(WtTagExtension n); void visit(WtPageSwitch n); void processTags();  }### Answer:
@Test public void testWiki2Tex() throws Exception { String text = "<sub>a</sub>, <sup>b</sup>, '''c''', ''d''"; final MathConverter mathConverter = new MathConverter(text); final String real = mathConverter.wiki2Tex(text); assertThat(real, containsString("_{a}")); assertThat(real, containsString("^{b}")); assertThat(real, containsString("\\mathbf{c}")); assertThat(real, containsString("\\mathit{d}")); assertThat(real, equalTo("_{a}, ^{b}, \\mathbf{c}, \\mathit{d}")); }