title: How can I mock a message sent from Google Cloud Messaging?
body: <p>I am using Google Cloud Messaging API to send push notifications to Android devices. I have implemented the <code>IntentService</code> and corresponding logic to handle notifications from the GCM server. The problem is that GCM sometimes takes up to fifteen minutes to dispatch messages, and it has made debugging a huge pain.</p>
  
  <p>I have searched for how to mock GCM, but did not find any solutions that apply to my situation. <strong>I already have the third-party client server implemented</strong>; the problem is waiting for GCM to actually dispatch the messages to the Android device. </p>
  
  <p>The entry point on the Android device is the <code>IntentService</code> that has a hook method <code>handleIntent(Intent)</code>. It seems like one possibility would be to write another program that sends a "spoofed" intent to the system, such that the system loads my <code>IntentService</code> with an intent that acts, looks and feels like an authentic GCM intent. That way, my apps could receive messages instantaneously.</p>
  
  <p>Has anybody encountered this issue, or have any tips on how to solve it?</p>