macroParameters.put( "section", "sec1" );
File basedir = new File( "" );
StringWriter out = new StringWriter();
XhtmlBaseSink sink = new XhtmlBaseSink( out );
MacroRequest request = new MacroRequest( macroParameters, basedir );
TocMacro macro = new TocMacro();
macro.execute( sink, request );
assertTrue( out.toString().contains( "<a href=\"#h21\">h21</a>" ) );