public function testMethods()
 {
     $event = new PamiEvent();
     $pamiEvent = $this->getMockBuilder('PAMI\\Message\\Event\\EventMessage')->disableOriginalConstructor()->getMock();
     /* @var \PAMI\Message\Event\EventMessage $pamiEvent */
     $event->setEvent($pamiEvent);
     static::assertSame($pamiEvent, $event->getEvent());
 }
 /**
  * Forward PAMI event to EventManager.
  *
  * @param EventMessage $e PAMI event
  */
 public function handle(EventMessage $e)
 {
     $eventPrefix = 'event.';
     $eventName = $eventPrefix . $e->getName();
     $event = new PamiEvent();
     $event->setName($eventName);
     $event->setTarget($this->client);
     $event->setEvent($e);
     $this->client->getEventManager()->triggerEvent($event);
 }