@Test
public void testSingleVideoStream() throws URISyntaxException, MalformedURLException, MediaPackageException, IOException, IllegalArgumentException, NotFoundException, ServiceRegistryException {

  MediaPackageBuilder builder = MediaPackageBuilderFactory.newInstance().newMediaPackageBuilder();
  // test resources
  URI uriMP = InspectWorkflowOperationHandler.class.getResource("/composite_mediapackage.xml").toURI();
  URI uriMPEncode = InspectWorkflowOperationHandler.class.getResource("/compound_mediapackage.xml").toURI();
  mp = builder.loadFromXml(uriMP.toURL().openStream());
  mpEncode = builder.loadFromXml(uriMPEncode.toURL().openStream());
  encodedTracks = mpEncode.getTracks();
  // set up mock workspace
  workspace = EasyMock.createNiceMock(Workspace.class);
  EasyMock.expect(
          workspace.moveTo((URI) EasyMock.anyObject(), (String) EasyMock.anyObject(), (String) EasyMock.anyObject(),
                  (String) EasyMock.anyObject())).andReturn(uriMPEncode);
  EasyMock.expect(workspace.get((URI) EasyMock.anyObject())).andReturn(
          new File(getClass().getResource("/watermark.jpg").toURI()));
  EasyMock.replay(workspace);
  // set up mock receipt
  job = EasyMock.createNiceMock(Job.class);
  EasyMock.expect(job.getPayload()).andReturn(MediaPackageElementParser.getAsXml(encodedTracks[0])).anyTimes();
  EasyMock.expect(job.getStatus()).andReturn(Job.Status.FINISHED);
  EasyMock.expect(job.getDateCreated()).andReturn(new Date());
  EasyMock.expect(job.getDateStarted()).andReturn(new Date());
  EasyMock.expect(job.getQueueTime()).andReturn(new Long(0));
  EasyMock.replay(job);
  // set up mock service registry
  ServiceRegistry serviceRegistry = EasyMock.createNiceMock(ServiceRegistry.class);
  EasyMock.expect(serviceRegistry.getJob(EasyMock.anyLong())).andReturn(job);
  EasyMock.replay(serviceRegistry);
  // set up service
  operationHandler = new CompositeWorkflowOperationHandler();
  operationHandler.setWorkspace(workspace);
  operationHandler.setServiceRegistry(serviceRegistry);
}