@Test
public void testChangeSeries() 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);
  MediaPackage clone = (MediaPackage) mp.clone();
  operation.setConfiguration(SeriesWorkflowOperationHandler.SERIES_PROPERTY, "series1");
  operation.setConfiguration(SeriesWorkflowOperationHandler.ATTACH_PROPERTY, "*");
  operation.setConfiguration(SeriesWorkflowOperationHandler.APPLY_ACL_PROPERTY, "false");
  WorkflowOperationResult result = operationHandler.start(instance, null);
  Assert.assertEquals(Action.CONTINUE, result.getAction());
  MediaPackage resultingMediapackage = result.getMediaPackage();
  Assert.assertEquals("series1", resultingMediapackage.getSeries());
  Assert.assertEquals("Series 1", resultingMediapackage.getSeriesTitle());
  Assert.assertEquals(clone.getElements().length + 1, resultingMediapackage.getElements().length);
}