/**
  * @param PlanDefinition $definition
  * @param Money $amountToPay
  * @param PlanParameters $parameters
  * @return bool
  */
 public function isAvailable(PlanDefinition $definition, Money $amountToPay, PlanParameters $parameters)
 {
     return $this->childCalculator->isAvailable($definition, $amountToPay, $parameters);
 }
 function let(PaymentPlanCalculatorInterface $delegatedFooCalculator)
 {
     $delegatedFooCalculator->supportsDefinition('Foo')->willReturn(true);
     $delegatedFooCalculator->supportsDefinition(Argument::not('Foo'))->willReturn(false);
     $this->registerCalculator($delegatedFooCalculator);
 }
 /**
  * @param PlanDefinition $definition
  * @return bool
  */
 public function supportsDefinition(PlanDefinition $definition)
 {
     return $this->childCalculator->supportsDefinition($definition);
 }