public function testSerializationDeserialization()
{
$obj = new PaymentDefinition(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getId());
$this->assertNotNull($obj->getName());
$this->assertNotNull($obj->getType());
$this->assertNotNull($obj->getFrequencyInterval());
$this->assertNotNull($obj->getFrequency());
$this->assertNotNull($obj->getCycles());
$this->assertNotNull($obj->getAmount());
$this->assertNotNull($obj->getChargeModels());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}