@Test
public void testStartWorkflow() throws Exception {

  // Media Package
  MediaPackage mp = MediaPackageBuilderFactory.newInstance().newMediaPackageBuilder().createNew();
  mp.setIdentifier(new IdImpl(MP_ID));
  // Asset Manager
  reset(assetManager);
  expect(assetManager.getMediaPackage(anyString())).andReturn(Opt.some(mp));
  // Workflow Service
  WorkflowDefinition wd = new WorkflowDefinitionImpl();
  wd.setId(WD_ID);
  Capture<Map<String, String>> wProperties = newCapture();
  reset(workflowService);
  expect(workflowService.getWorkflowDefinitionById(WD_ID)).andReturn(wd);
  expect(workflowService.start(eq(wd), eq(mp), capture(wProperties))).andReturn(null);
  replay(assetManager, workflowService);
  WorkflowOperationResult result = operationHandler.start(workflowInstance, null);
  verify(assetManager, workflowService);
  assertEquals(WorkflowOperationResult.Action.CONTINUE, result.getAction());
  assertEquals(2, wProperties.getValue().size());
  assertEquals("true", wProperties.getValue().get("workflowConfigurations"));
  assertEquals("value", wProperties.getValue().get("key"));
}