public function testJsonEncodeWorksOnDeviceRecipients()
 {
     $body = '{"to":"deviceId","notification":{"title":"test","body":"a nice testing notification"}}';
     $notification = new Notification('test', 'a nice testing notification');
     $message = new Message();
     $message->setNotification($notification);
     $message->addRecipient(new Device('deviceId'));
     $this->assertSame($body, json_encode($message));
 }