urbanairship-core/src/test/java/com/urbanairship/actions/ActionRegistryTest.java
@Test
    public void testLandingPagePredicateAppNeverOpened() {
        registry.registerDefaultActions(TestApplication.getApplication());

        ActionRegistry.Entry entry = registry.getEntry("^p");
        assertNotNull("Landing Page should have a default predicate", entry.getPredicate());

        // Set to -1, the default.
        when(metrics.getLastOpenTimeMillis()).thenReturn(-1L);

        assertFalse("Should not accept PUSH_RECEIVED when the app has never been opened.",
                entry.getPredicate().apply(ActionTestUtils.createArgs(Action.SITUATION_PUSH_RECEIVED, "value", null)));
    }
/**
     * Test the landing page default predicate rejects Action.SITUATION_PUSH_RECEIVED
     * if the app has never been opened.
     */
Test the landing page default predicate rejects Action.SITUATION_PUSH_RECEIVED
if the app has never been opened.
Test the landing page default predicate rejects Action . SITUATION_PUSH_RECEIVED if the app has never been opened .
@Test
    public void testLandingPagePredicateAppNeverOpened() {
        registry.registerDefaultActions(TestApplication.getApplication());
        ActionRegistry.Entry entry = registry.getEntry("^p");
        assertNotNull("Landing Page should have a default predicate", entry.getPredicate());
        when(metrics.getLastOpenTimeMillis()).thenReturn(-1L);
        assertFalse("Should not accept PUSH_RECEIVED when the app has never been opened.",
                entry.getPredicate().apply(ActionTestUtils.createArgs(Action.SITUATION_PUSH_RECEIVED, "value", null)));
    }
@ Test public void testLandingPagePredicateAppNeverOpened ( ) { registry . registerDefaultActions ( TestApplication . getApplication ( ) ) ; ActionRegistry . Entry entry = registry . getEntry ( "^p" ) ; assertNotNull ( "Landing Page should have a default predicate" , entry . getPredicate ( ) ) ; when ( metrics . getLastOpenTimeMillis ( ) ) . thenReturn ( - 1L ) ; assertFalse ( "Should not accept PUSH_RECEIVED when the app has never been opened." , entry . getPredicate ( ) . apply ( ActionTestUtils . createArgs ( Action . SITUATION_PUSH_RECEIVED , "value" , null ) ) ) ; }
Test the landing page default predicate rejects Action.SITUATION_PUSH_RECEIVED
 if the app has never been opened.
Test the landing page default predicate rejects Action . SITUATION_PUSH_RECEIVED if the app has never been opened .
// Set to -1, the default.