assertTrue(found);
}
@Test
public void canCreateAssetWithMultipleFiles() throws Exception {
AssetInfo asset = createTestAsset("createWithMultipleFiles");
AccessPolicyInfo policy = createWritePolicy("createWithMultipleFiles",
10);
LocatorInfo locator = createLocator(policy, asset, 5);
WritableBlobContainerContract blobWriter = service
.createBlobWriter(locator);
createAndUploadBlob(blobWriter, "blob1.bin", firstPrimes);
createAndUploadBlob(blobWriter, "blob2.bin", onesAndZeros);
createAndUploadBlob(blobWriter, "blob3.bin", countingUp);
AssetFileInfo file1 = service.create(AssetFile
.create(asset.getId(), "blob1.bin").setIsPrimary(true)
.setIsEncrypted(false)
.setContentFileSize(new Long(firstPrimes.length)));
AssetFileInfo file2 = service.create(AssetFile
.create(asset.getId(), "blob2.bin").setIsPrimary(false)
.setIsEncrypted(false)
.setContentFileSize(new Long(onesAndZeros.length)));
AssetFileInfo file3 = service.create(AssetFile
.create(asset.getId(), "blob3.bin").setIsPrimary(false)
.setIsEncrypted(false)
.setContentFileSize(new Long(countingUp.length))
.setContentChecksum("1234"));
ListResult<AssetFileInfo> files = service.list(AssetFile.list(asset
.getAssetFilesLink()));
assertEquals(3, files.size());
ArrayList<AssetFileInfo> results = new ArrayList<AssetFileInfo>(files);