### Question:
TOCGenerator { @Deprecated public static String makeHeadingID(String text, int occurence, XWikiContext context) { text = "H" + text; text = text.replaceAll("[^a-zA-Z0-9]", ""); if (occurence > 0) { return text + "-" + occurence; } else { return text; } }  static Map<String, Map<String, Object>> generateTOC(String content, int init, int max, boolean numbered,
        XWikiContext context); @Deprecated static String makeHeadingID(String text, int occurence, XWikiContext context); static final String TOC_DATA_NUMBERING; static final String TOC_DATA_LEVEL; static final String TOC_DATA_TEXT; }### Answer:
@Test public void testMakeHeadingID() { Assert.assertEquals("Hheader", TOCGenerator.makeHeadingID("header", 0, null)); Assert.assertEquals("Hheaderwithspace", TOCGenerator.makeHeadingID("header with space", 0, null)); Assert.assertEquals("Hheader-1", TOCGenerator.makeHeadingID("header", 1, null)); }