/**
  * @expectedException \InvalidArgumentException
  * @dataProvider getTestAmountsForIndependentCredit
  */
 public function testCreditOnlyAcceptsValidAmountsForIndependentCredits($amount)
 {
     $controller = $this->getController();
     $instruction = new PaymentInstruction(150.0, 'EUR', 'foo', new ExtendedData());
     $instruction->setState(PaymentInstructionInterface::STATE_VALID);
     $credit = new Credit($instruction, 50);
     $instruction->setDepositedAmount(10.0);
     $instruction->setReversingDepositedAmount(0.01);
     $instruction->setCreditedAmount(0.01);
     $instruction->setCreditingAmount(0.01);
     $this->callCredit($controller, array($credit, $amount));
 }