function it_builds_a_petrinet(FactoryInterface $factory, PetrinetInterface $petrinet, PlaceInterface $placeOne, PlaceInterface $placeTwo, TransitionInterface $transitionOne, TransitionInterface $transitionTwo)
 {
     $factory->createPetrinet()->willReturn($petrinet);
     $factory->createPlace()->willReturn($placeOne, $placeTwo);
     $factory->createTransition()->willReturn($transitionOne, $transitionTwo);
     $petrinet->setTransitions(array($transitionOne, $transitionTwo))->shouldBeCalled();
     $petrinet->setPlaces(array($placeOne, $placeTwo))->shouldBeCalled();
     $this->beConstructedWith($factory);
     $this->place();
     $this->place();
     $this->transition();
     $this->transition();
     $this->getPetrinet()->shouldReturn($petrinet);
 }
 /**
  * Creates a transition.
  *
  * @return \Petrinet\Model\TransitionInterface
  */
 public function transition()
 {
     $transition = $this->factory->createTransition();
     $this->transitions[] = $transition;
     return $transition;
 }