public function testSetGetExtendedData()
 {
     $transaction = new FinancialTransaction();
     $extendedData = $this->getMock('JMS\\Payment\\CoreBundle\\Model\\ExtendedDataInterface');
     $this->assertNull($transaction->getExtendedData());
     $transaction->setExtendedData($extendedData);
     $this->assertSame($extendedData, $transaction->getExtendedData());
 }
 public function testApproveAndDepositCanceled()
 {
     $transaction = new FinancialTransaction();
     $response = $this->getCanceledResponse();
     $transaction->setExtendedData(new ExtendedData());
     foreach ($response as $key => $val) {
         $transaction->getExtendedData()->set($key, $val);
     }
     $this->sipsPlugin->approveAndDeposit($transaction, false);
     $this->assertEquals(SipsPlugin::RESPONSE_CODE_CANCELED, $transaction->getResponseCode());
     $this->assertEquals('Payment canceled', $transaction->getReasonCode());
 }