@Test
public void testDistributeElement() throws Exception {

  Upload upload = EasyMock.createNiceMock(Upload.class);
  EasyMock.expect(
          tm.upload(EasyMock.anyObject(String.class), EasyMock.anyObject(String.class),
                  EasyMock.anyObject(File.class))).andReturn(
          upload);
  EasyMock.replay(upload, tm);
  Set<String> mpeIds = new LinkedHashSet<String>();
  mpeIds.add("presenter-delivery");
  MediaPackageElement[] mpes = service.distributeElements("channelId", mp, mpeIds, false);
  MediaPackageElement mpe = mpes[0];
  Assert.assertEquals(new URI(
                  "http://XYZ.cloudfront.net/channelId/efd6e4df-63b6-49af-be5f-15f598778877/presenter-delivery/video-presenter-delivery.mp4"),
          mpe.getURI());
}