public function testSerializationDeserialization()
{
$obj = new Sale(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getId());
$this->assertNotNull($obj->getPurchaseUnitReferenceId());
$this->assertNotNull($obj->getAmount());
$this->assertNotNull($obj->getPaymentMode());
$this->assertNotNull($obj->getState());
$this->assertNotNull($obj->getReasonCode());
$this->assertNotNull($obj->getProtectionEligibility());
$this->assertNotNull($obj->getProtectionEligibilityType());
$this->assertNotNull($obj->getClearingTime());
$this->assertNotNull($obj->getPaymentHoldStatus());
$this->assertNotNull($obj->getPaymentHoldReasons());
$this->assertNotNull($obj->getTransactionFee());
$this->assertNotNull($obj->getReceivableAmount());
$this->assertNotNull($obj->getExchangeRate());
$this->assertNotNull($obj->getFmfDetails());
$this->assertNotNull($obj->getReceiptId());
$this->assertNotNull($obj->getParentPayment());
$this->assertNotNull($obj->getProcessorResponse());
$this->assertNotNull($obj->getBillingAgreementId());
$this->assertNotNull($obj->getCreateTime());
$this->assertNotNull($obj->getUpdateTime());
$this->assertNotNull($obj->getLinks());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}