/**
  * @param array $payload
  * 
  * @return MessageReadEvent
  */
 public static function createMessageReadEvent(array $payload)
 {
     $read = Read::create($payload['read']);
     $senderId = $payload['sender']['id'];
     $recipientId = $payload['recipient']['id'];
     $timestamp = $payload['timestamp'];
     return new MessageReadEvent($senderId, $recipientId, $timestamp, $read);
 }
 function it_create_a_message_read_event()
 {
     $raw = '
         {
            "sender":{
               "id":"USER_ID"
            },
            "recipient":{
               "id":"PAGE_ID"
            },
            "timestamp":1458668856463,
            "read":{
               "watermark":1458668856253,
               "seq":38
            }
         }  
     ';
     $arr = json_decode($raw, true);
     $expectedEvent = new MessageReadEvent('USER_ID', 'PAGE_ID', 1458668856463, Read::create($arr['read']));
     $event = $this::createMessageReadEvent($arr);
     $event->shouldBeLike($expectedEvent);
     $event2 = $this::create($arr);
     $event2->shouldBeLike($expectedEvent);
 }