title: Mocking Firebase Messages in a Functional Espresso Test
body: <p>How can I mock receiving a message from FCM in my functional Espresso Test on Android?</p>
  
  <p>I have tried to send an Intent to <a href="https://developer.android.com/reference/android/content/Context#startService(android.content.Intent)" rel="nofollow noreferrer">Context.startService()</a> with an action of <code>com.google.firebase.MESSAGING_EVENT</code> to start my FirebaseMessagingService but <code>onMessageReceived</code> is never called.</p>
  
  <p>Do I just need to extract the logic in the service to a different class and test it and ignore Firebase Messaging, or I could convert my functional test into an integration test and actually send a message to Firebase?  </p>
  
  <p><code>#AskFirebase</code></p>