urbanairship-core/src/test/java/com/urbanairship/ChannelCaptureTest.java
@Test
    public void testForegroundEmptyClipboard() {
        when(mockPushManager.getChannelId()).thenReturn("channel ID");
        clipboardManager.setPrimaryClip(ClipData.newPlainText("", ""));

        activityMonitor.startActivity();

        // Verify we did not post a notification
        assertEquals(shadowOf(RuntimeEnvironment.application).getNextStartedActivity(), null);
    }
/**
     * Test app foreground when the clipboard is empty.
     */
Test app foreground when the clipboard is empty.
Test app foreground when the clipboard is empty .
@Test
    public void testForegroundEmptyClipboard() {
        when(mockPushManager.getChannelId()).thenReturn("channel ID");
        clipboardManager.setPrimaryClip(ClipData.newPlainText("", ""));
        activityMonitor.startActivity();
        assertEquals(shadowOf(RuntimeEnvironment.application).getNextStartedActivity(), null);
    }
@ Test public void testForegroundEmptyClipboard ( ) { when ( mockPushManager . getChannelId ( ) ) . thenReturn ( "channel ID" ) ; clipboardManager . setPrimaryClip ( ClipData . newPlainText ( "" , "" ) ) ; activityMonitor . startActivity ( ) ; assertEquals ( shadowOf ( RuntimeEnvironment . application ) . getNextStartedActivity ( ) , null ) ; }
Test app foreground when the clipboard is empty.
Test app foreground when the clipboard is empty .
// Verify we did not post a notification