/**
  * Sets the state on deserialization.
  * 
  * @param array $state
  * @return ezcPersistentRelationCollection
  */
 public static function __set_state(array $state)
 {
     $relations = new ezcPersistentRelationCollection();
     $relations->exchangeArray($state);
     return $relations;
 }
 public function testSetState()
 {
     $expected = new ezcPersistentRelationCollection();
     $expected['foo'] = new ezcPersistentOneToManyRelation('src', 'dst');
     $this->assertEquals($expected, ezcPersistentRelationCollection::__set_state(array('foo' => new ezcPersistentOneToManyRelation('src', 'dst'))));
 }