### Question:
SsiMacro extends AbstractMacro { public void execute( Sink sink, MacroRequest request ) throws MacroExecutionException { String function = (String) request.getParameter( PARAM_FUNCTION ); required( PARAM_FUNCTION, function ); StringBuilder buff = new StringBuilder(); buff.append( '#' ); buff.append( function ); for ( Map.Entry<String, Object> entry : request.getParameters().entrySet() ) { if ( !isInternalParameter( entry.getKey() ) ) { buff.append( ' ' ); buff.append( entry.getKey() ); buff.append( "=\"" ); buff.append( entry.getValue() ); buff.append( '"' ); } } buff.append( ' ' ); sink.comment( buff.toString() ); }  void execute( Sink sink, MacroRequest request );  }### Answer:
@Test public void testExecute() throws MacroExecutionException { Map<String, Object> macroParameters = new HashMap<>(); macroParameters.put( "function", "include" ); macroParameters.put( "file", "include-file.html" ); MacroRequest request = new MacroRequest( "source", new XhtmlBaseParser(), macroParameters, new File( "." ) ); SsiMacro macro = new SsiMacro(); SinkEventTestingSink sink = new SinkEventTestingSink(); macro.execute( sink, request ); Iterator<SinkEventElement> it = sink.getEventList().iterator(); SinkEventElement event = it.next(); assertEquals( "comment", event.getName() ); String comment = (String) event.getArgs()[0]; assertEquals( "#include file=\"include-file.html\" ", comment ); assertFalse( it.hasNext() ); }