String result = action.downloadStatisticsReport();
assertEquals( GenerateReportAction.SEND_FILE, result );
assertFalse( action.hasActionErrors() );
assertFalse( action.hasFieldErrors() );
RepositoryContentStatisticsDAOStub dao =
(RepositoryContentStatisticsDAOStub) lookup( RepositoryContentStatisticsDAO.class, "jdo" );
RepositoryContentStatistics stats = dao.queryRepositoryContentStatistics(
new RepositoryContentStatisticsByRepositoryConstraint( SNAPSHOTS ) ).get( 0 );
assertEquals(
"Date of Scan,Total File Count,Total Size,Artifact Count,Group Count,Project Count,Plugins,Archetypes,Jars,Wars,Deployments,Downloads\n" +
stats.getWhenGathered() + ",0,0,0,0,0,1,0,1,1,0,0\n", IOUtils.toString( action.getInputStream() ) );