@Test
public void testAllTagsFlavors() throws Exception {

  WorkflowInstanceImpl instance = new WorkflowInstanceImpl();
  List<WorkflowOperationInstance> ops = new ArrayList<WorkflowOperationInstance>();
  WorkflowOperationInstanceImpl operation = new WorkflowOperationInstanceImpl("test", OperationState.INSTANTIATED);
  ops.add(operation);
  instance.setOperations(ops);
  instance.setMediaPackage(mp);
  operation.setConfiguration(TagWorkflowOperationHandler.SOURCE_FLAVORS_PROPERTY, "presenter/source");
  operation.setConfiguration(TagWorkflowOperationHandler.TARGET_FLAVOR_PROPERTY, "presenter/test");
  operation.setConfiguration(TagWorkflowOperationHandler.TARGET_TAGS_PROPERTY, "tag1,tag2");
  operation.setConfiguration(TagWorkflowOperationHandler.COPY_PROPERTY, "false");
  WorkflowOperationResult result = operationHandler.start(instance, null);
  MediaPackage resultingMediapackage = result.getMediaPackage();
  Track track = resultingMediapackage.getTrack("track-2");
  Assert.assertEquals("presenter/test", track.getFlavor().toString());
  Assert.assertEquals("tag1", track.getTags()[0]);
  Assert.assertEquals("tag2", track.getTags()[1]);
  instance = new WorkflowInstanceImpl();
  ops = new ArrayList<WorkflowOperationInstance>();
  operation = new WorkflowOperationInstanceImpl("test", OperationState.INSTANTIATED);
  ops.add(operation);
  instance.setOperations(ops);
  instance.setMediaPackage(resultingMediapackage);
  operation.setConfiguration(TagWorkflowOperationHandler.SOURCE_TAGS_PROPERTY, "tag1");
  operation.setConfiguration(TagWorkflowOperationHandler.TARGET_FLAVOR_PROPERTY, "presenter/source");
  operation.setConfiguration(TagWorkflowOperationHandler.TARGET_TAGS_PROPERTY, "-tag1,+tag3");
  operation.setConfiguration(TagWorkflowOperationHandler.COPY_PROPERTY, "false");
  result = operationHandler.start(instance, null);
  resultingMediapackage = result.getMediaPackage();
  track = resultingMediapackage.getTrack("track-2");
  Assert.assertEquals("presenter/source", track.getFlavor().toString());
  Assert.assertEquals("tag2", track.getTags()[0]);
  Assert.assertEquals("tag3", track.getTags()[1]);
}