How to make android unit test for notifications?
I have the class handleFirebaseMessages . It contains the function onMessageReceived() . This function is in charge of receiving data and creating notifications. onMessageReceived() receives data in a RemoteMessages object. I am trying to write a test for this function. But I've not got it completely. HandleFirebaseMessages public class HandleFirebaseMessages extends FirebaseMessagingService { @Override public void onMessageReceived(final RemoteMessage remoteMessage) { final Map<String, String> data = remoteMessage.getData(); //create notifications using NotificationCompat.Builder } } I've