assertByteArrayEquals(input, plainText);
}
private JobInfo decodeAsset(String name, String inputAssetId)
throws ServiceException, InterruptedException {
MediaProcessorInfo mediaProcessorInfo = service.list(
MediaProcessor.list().set("$filter",
"Name eq '" + storageDecryptionProcessor + "'")).get(0);
String taskBody = "<taskBody>"
+ "<inputAsset>JobInputAsset(0)</inputAsset><outputAsset assetCreationOptions=\"0\" assetName=\"Output\">JobOutputAsset(0)</outputAsset></taskBody>";
JobInfo jobInfo = service.create(Job
.create()
.addInputMediaAsset(inputAssetId)
.addTaskCreator(
Task.create(mediaProcessorInfo.getId(), taskBody)
.setName(name)));
JobInfo currentJobInfo = jobInfo;
int retryCounter = 0;
while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) {