IAuthorizationPolicy mockAuthPolicy = mock( IAuthorizationPolicy.class );
doReturn( true ).when( mockAuthPolicy ).isAllowed( anyString() );
BaseExportProcessor mockExportProcessor = mock( BaseExportProcessor.class );
File mockExportFile = mock( File.class );
ExportHandler mockExportHandler = mock( ExportHandler.class );
StreamingOutput mockStream = mock( StreamingOutput.class );
RepositoryFile mockRepoFile = mock( RepositoryFile.class );
doReturn( fileName ).when( mockRepoFile ).getName();
doReturn( mockExportFile ).when( mockExportProcessor ).performExport( mockRepoFile );