public void testSearchGeneratedContent() {
String lineageId = "test.prpt",
pathId = "test.prpt",
userFolder = "public/admin";
RepositoryFileDto fileDetailsMock = mock( RepositoryFileDto.class );
RepositoryFile workspaceFolder = mock( RepositoryFile.class );
doReturn( userFolder ).when( workspaceFolder ).getId();
SessionResource sessionResource = mock( SessionResource.class );
List<RepositoryFile> children = new ArrayList<RepositoryFile>();
RepositoryFile mockedChild = mock( RepositoryFile.class );
doReturn( false ).when( mockedChild ).isFolder();
children.add( mockedChild );
Map<String, Serializable> mockedFileMetadata = mock( Map.class );
doReturn( lineageId ).when( mockedFileMetadata ).get( QuartzScheduler.RESERVEDMAPKEY_LINEAGE_ID );
when( fileService.repository.getFileMetadata( mockedChild.getId() ) ).thenReturn( mockedFileMetadata );
doReturn( pathId ).when( fileDetailsMock ).getId();
doReturn( userFolder ).when( sessionResource ).doGetCurrentUserDir();
doReturn( workspaceFolder ).when( fileService.repository ).getFile( userFolder );
doReturn( sessionResource ).when( fileService ).getSessionResource();
doReturn( children ).when( fileService.repository ).getChildren( userFolder );
RepositoryFileDto mockedRepositoryFileDto = mock( RepositoryFileDto.class );
doReturn( mockedRepositoryFileDto ).when( fileService ).toFileDto( mockedChild, null, false );
try {
doReturn( fileDetailsMock ).when( fileService ).doGetProperties( pathId );
List<RepositoryFileDto> list = fileService.searchGeneratedContent(userFolder, lineageId, QuartzScheduler.RESERVEDMAPKEY_LINEAGE_ID );