title: How do I detect with Robolectric that onBackPressed is called programmatically?
body: <p>I am using Robolectric to do unit tests. In my app I have a method that programmatically calls onBackPressed. However I do not know how to test whether this method is properly executed with RoboLectric. I have already tested it on a device and the method works fine. But now: how do I validate this with Robolectric?</p>