public function testWrongFactorySource()
 {
     $this->setExpectedException(UnableToBuild::class);
     $plan = new FactoryObjectProductBuildPlan();
     $plan->setFactoryObject(new ScalarValue("not a factory"));
     $this->haringo->buildObjectBasedOn($plan);
 }
 public function mapToObject(array $previouslyMappedObject)
 {
     $plan = new FactoryObjectProductBuildPlan();
     $plan->setFactoryObject($this->objectSourceMapper->mapToObject($previouslyMappedObject[0]));
     $plan->setBuildMethodCall($this->methodCallMapper->mapToObject($previouslyMappedObject[1]));
     return $plan;
 }