robolectric/robolectric — pull request #1130 by kriegfrj (2014-06-06 15:27:08+00:00)
Title: Enhancements to Shadow Service.setForeground() notification handling

Some useful tweaks I added to help me with testing foregrounding of my service. In particular, the Notification<.code> that you supply in setForeground() is actually registered with the NotificationManager - making behaviour more closely match that of real Android. Plus added one-arg convenience version of getNotification() to ShadowNotificationManager to parallel the one-arg version of notify().