/**
  * {@inheritDoc}
  */
 public function deserialize($data)
 {
     if ($this->objectMapper) {
         $this->objectMapper->map($data);
     }
     return $this->serializer->unserialize($data);
 }
 /**
  * @test
  */
 public function can_deserialize_unkown_class()
 {
     $objectMapper = new EventObjectMapper();
     $objectMapper->addEventObject('Unkown\\Domain\\DomainMessage', 'Broadway\\Domain\\DomainMessage');
     $serializedEvent = $this->getSerializedEvent();
     $objectMapper->map($serializedEvent);
     $domainMessage = $this->createDomainMessage(array('foo' => 'bar'));
     $desserializedEvent = $this->serializer->deserialize($serializedEvent);
     $this->assertEquals($domainMessage, $desserializedEvent);
 }