### Question:
FoAggregateSink extends FoSink { public void body() { body( null ); } FoAggregateSink( Writer writer ); void head(); void head( SinkEventAttributes attributes ); void head_(); void title(); void title( SinkEventAttributes attributes ); void title_(); void author(); void author( SinkEventAttributes attributes ); void author_(); void date(); void date( SinkEventAttributes attributes ); void date_(); void body(); void body( SinkEventAttributes attributes ); void body_(); void setDocumentTitle( String title ); void setDocumentName( String name ); void setDocumentModel( DocumentModel model ); void setDocumentModel( DocumentModel model, int tocPos ); void figureGraphics( String name ); void figureGraphics( String src, SinkEventAttributes attributes ); void anchor( String name ); void anchor( String name, SinkEventAttributes attributes ); void link( String name ); void link( String name, SinkEventAttributes attributes ); void toc(); void coverPage(); static final int TOC_NONE; static final int TOC_START; static final int TOC_END; }### Answer:
@Test public void testBody() { try { sink = new FoAggregateSink( writer ); sink.setDocumentName( "folder/documentName.apt" ); sink.setDocumentTitle( "documentTitle" ); sink.body(); sink.body_(); } finally { sink.close(); } assertTrue( writer.toString().contains( "<fo:block id=\"./folder/documentName\">" ) ); }