@Test
public void testDistribute() throws Exception {

  setUpMultiTenant();
  expect(securityService.getOrganization()).andReturn(org1).anyTimes();
  replay(securityService);
  streamingService.activate(bundleContext, map);
  MediaPackage mp = MediaPackageParser.getFromXml(
          IOUtils.toString(getClass().getResourceAsStream("/mediapackage.xml"), "UTF-8"));
  Job job = streamingService.distribute("channel", mp, "blah");
  JobBarrier jobBarrier = new JobBarrier(null, serviceRegistry, 500, job);
  jobBarrier.waitForJobs();
}