urbanairship-core/src/test/java/com/urbanairship/ActivityMonitorTest.java
@Test
    public void testActivityStopped() throws Exception {
        Robolectric.buildActivity(Activity.class).create().start().stop();
        Robolectric.flushForegroundThreadScheduler();
        assertFalse(isForeground);
    }
/**
     * This test verifies removing an activity calls the onBackground delegate call
     *
     * @throws Exception
     */
This test verifies removing an activity calls the onBackground delegate call
@throws Exception
This test verifies removing an activity calls the onBackground delegate call @throws Exception
@Test
    public void testActivityStopped() throws Exception {
        Robolectric.buildActivity(Activity.class).create().start().stop();
        Robolectric.flushForegroundThreadScheduler();
        assertFalse(isForeground);
    }
@ Test public void testActivityStopped ( ) throws Exception { Robolectric . buildActivity ( Activity . class ) . create ( ) . start ( ) . stop ( ) ; Robolectric . flushForegroundThreadScheduler ( ) ; assertFalse ( isForeground ) ; }
This test verifies removing an activity calls the onBackground delegate call
 @throws Exception
This test verifies removing an activity calls the onBackground delegate call @throws Exception