public function testIsTransitionAvailable()
 {
     $workflowName = 'test_workflow';
     $workflowItem = new WorkflowItem();
     $workflowItem->setWorkflowName($workflowName);
     $errors = new ArrayCollection();
     $transition = new Transition();
     $transition->setName('test_transition');
     $workflow = $this->createWorkflow($workflowName);
     $workflow->expects($this->once())->method('isTransitionAvailable')->with($workflowItem, $transition, $errors)->will($this->returnValue(true));
     $this->workflowRegistry->expects($this->once())->method('getWorkflow')->with($workflowName)->will($this->returnValue($workflow));
     $this->assertTrue($this->workflowManager->isTransitionAvailable($workflowItem, $transition, $errors));
 }