public function testSerializeDeserialize() { $a1 = $this->amountDetails; $a2 = new Details(); $a2->fromJson($a1->toJson()); $this->assertEquals($a1, $a2); }