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

        activityMonitor.startActivity();

        // Verify we did not post a notification
        assertEquals(shadowOf(RuntimeEnvironment.application).getNextStartedActivity(), null);
    }
/**
     * Test app foreground when the clipboard has a String that differs from
     * the expected channel capture token.
     */
Test app foreground when the clipboard has a String that differs from
the expected channel capture token.
Test app foreground when the clipboard has a String that differs from the expected channel capture token .
@Test
    public void testForegroundClipboardWithoutToken() {
        when(mockPushManager.getChannelId()).thenReturn("channel ID");
        clipboardManager.setPrimaryClip(ClipData.newPlainText("WHAT!", "OK!"));
        activityMonitor.startActivity();
        assertEquals(shadowOf(RuntimeEnvironment.application).getNextStartedActivity(), null);
    }
@ Test public void testForegroundClipboardWithoutToken ( ) { when ( mockPushManager . getChannelId ( ) ) . thenReturn ( "channel ID" ) ; clipboardManager . setPrimaryClip ( ClipData . newPlainText ( "WHAT!" , "OK!" ) ) ; activityMonitor . startActivity ( ) ; assertEquals ( shadowOf ( RuntimeEnvironment . application ) . getNextStartedActivity ( ) , null ) ; }
Test app foreground when the clipboard has a String that differs from
 the expected channel capture token.
Test app foreground when the clipboard has a String that differs from the expected channel capture token .
// Verify we did not post a notification