Вы можете использовать эмулятор, только для подобных тестов, с Android Marshmallow (api 23).
Например:
public void testCheckNotification_2() throws IOException, InterruptedException, GcmException
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
GcmResponse gcmResponse = endPointImp.sendGcmMulticastRequestImp(getGcmMultiRequest());
assertThat(gcmResponse.getSuccess(), is(1));
Thread.sleep(2000);
assertThat(mManager.getActiveNotifications().length, is(1));
StatusBarNotification barNotification = mManager.getActiveNotifications()[0];
assertThat(barNotification.getId(), is(INCIDENCIA.getTitleRsc()));
// We check the pending intent.
PendingIntent pendingIntent = barNotification.getNotification().contentIntent;
assertThat(pendingIntent.getCreatorPackage(), is(GcmRequest.PACKAGE_DIDEKINDROID));
}
}
Важной частью является вызов NotificationManager (mManager), чтобы проверить наличие активных уведомлений после отправки многоадресного сообщения в конечную точку http FCM Google.