public void TestJobWithTaskNotificationToWebHookEndPointWithEncryption()
{
byte[] bytes = new byte[64];
IAsset asset1 = AssetTests.CreateAsset(_mediaContext, WindowsAzureMediaServicesTestConfiguration.SmallWmv2, AssetCreationOptions.None);
asset1.Name = "SmallWmv2";
asset1.Update();
string configuration = File.ReadAllText(WindowsAzureMediaServicesTestConfiguration.ProxyConfig);
string webhookEndpoint = ConfigurationManager.AppSettings["WebHookEndPointWithEncryption"];
INotificationEndPoint endpoint = _mediaContext.NotificationEndPoints.Create("endpoint2",
NotificationEndPointType.WebHook, webhookEndpoint, bytes);
IJob job = _mediaContext.Jobs.Create("Test");
IMediaProcessor mediaProcessor = GetMediaProcessor(_mediaContext, WindowsAzureMediaServicesTestConfiguration.MesName);
ITask task = job.Tasks.AddNew("Task1", mediaProcessor, configuration, TaskOptions.None);
task.InputAssets.Add(asset1);
task.OutputAssets.AddNew("JobOutput", options: AssetCreationOptions.None, formatOption: AssetFormatOption.None);
task.TaskNotificationSubscriptions.AddNew(NotificationJobState.All, endpoint, true);
job.Submit();
WaitForJob(job.Id, JobState.Finished, VerifyAllTasksFinished);
}