### Question:
MarkupToEclipseHelpMojo extends AbstractMojo { protected MarkupToEclipseToc createMarkupToEclipseToc(String relativePath, File htmlOutputFile, String name) { MarkupToEclipseToc toEclipseToc = new SplittingMarkupToEclipseToc(); toEclipseToc.setBookTitle(title == null ? name : title); toEclipseToc.setCopyrightNotice(copyrightNotice); toEclipseToc.setAnchorLevel(tocAnchorLevel); toEclipseToc.setHelpPrefix(calculateHelpPrefix(relativePath)); toEclipseToc.setHtmlFile(htmlOutputFile.getName()); return toEclipseToc; }  void execute();  }### Answer:
@Test public void createMarkupToEclipseTocCopyrightNotice() { File file = mock(File.class); doReturn("Test.html").when(file).getName(); markupToEclipseHelp.copyrightNotice = "Test Copyright"; MarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test"); assertEquals("Test Copyright", toc.getCopyrightNotice()); }
@Test public void createMarkupToEclipseTocAnchorLevel() { File file = mock(File.class); doReturn("Test.html").when(file).getName(); MarkupToEclipseToc toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test"); assertEquals(0, toc.getAnchorLevel()); markupToEclipseHelp.tocAnchorLevel = 3; toc = markupToEclipseHelp.createMarkupToEclipseToc("", file, "Test"); assertEquals(3, toc.getAnchorLevel()); }