@Test
public void testCreateReportContentReportComponent1() throws Exception {

  final ExecuteReportContentHandler handler = new ExecuteReportContentHandler( contentGenerator );
  // validated and executed.
  when( reportComponent.validate() ).thenReturn( true );
  when( reportComponent.execute() ).thenReturn( true );
  // simulate pagable html.
  when( reportComponent.getComputedOutputTarget() ).thenReturn( HtmlTableModule.TABLE_HTML_PAGE_EXPORT_TYPE );
  inputs.remove( ParameterXmlContentHandler.SYS_PARAM_SESSION_ID );
  boolean force = false;
  handler.createReportContent( outputStream, fileId, path, force, reportComponent, audit );
  assertNotNull( "always have sys param session Id set.",
    inputs.get( ParameterXmlContentHandler.SYS_PARAM_SESSION_ID ) );
  // report component initialized:
  verify( reportComponent, times( 1 ) ).setReportFileId( eq( fileId ) );
  verify( reportComponent, times( 1 ) ).setPaginateOutput( eq( true ) );
  verify( reportComponent, times( 1 ) ).setForceDefaultOutputTarget( force );
  // do override this value only for prpti reports, not for prpt.
  verify( reportComponent, times( 0 ) ).setForceUnlockPreferredOutput( anyBoolean() );
  verify( reportComponent, times( 1 ) ).setInputs( eq( inputs ) );
  // finally we obtain MasterReport from report component
  verify( reportComponent, times( 1 ) ).getReport();
  // we do set output stream to report component - for THRU it is wrapped servlet output stream
  verify( reportComponent, times( 1 ) ).setOutputStream( any( OutputStream.class ) );
  verify( reportComponent, times( 1 ) ).getMimeType();
}