Puede utilizar un emulador, sólo para este tipo de pruebas, con Android Marshmallow (API 23).
Por ejemplo:
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));
}
}
La parte importante es la llamada a la NotificationManager (mManager) para comprobar que tiene notificaciones activas después de enviar un mensaje de multidifusión a Google FCM extremo HTTP.
Existe un marco de pruebas llamado robotium, pero no sé si admite notificaciones. Pero en caso de que el lib de junit no lo soporte, puede verificar allí tal vez. http://code.google.com/p/robotium/ –