MetadataFileUpload fileUpload = MetadataFileUploadRepositoryTest.newMetadataFileUpload(_inc);
fileUpload.setMetadataId(metadata.getId());
fileUpload = _metadataFileUploadRepo.save(fileUpload);
MetadataFileDownload fileDownload1 = newMetadataFileDownload();
fileDownload1.setMetadataId(metadata.getId());
fileDownload1.setFileUploadId(fileUpload.getId());
fileDownload1 = _metadataFileDownloadRepo.save(fileDownload1);
MetadataFileDownload fileDownload2 = newMetadataFileDownload();
fileDownload2.setMetadataId(metadata.getId());
fileDownload2.setFileUploadId(fileUpload.getId());
fileDownload2 = _metadataFileDownloadRepo.save(fileDownload2);
assertEquals(fileDownload1, _metadataFileDownloadRepo.findOne(fileDownload1.getId()));
assertEquals(fileDownload2, _metadataFileDownloadRepo.findOne(fileDownload2.getId()));
}