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

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

        // Set the last open to 6 days ago
        when(metrics.getLastOpenTimeMillis()).thenReturn(System.currentTimeMillis() - 6 * 24 * 1000 * 3600);

        assertTrue("Should accept PUSH_RECEIVED when the app has been opened in the last week.",
                entry.getPredicate().apply(ActionTestUtils.createArgs(Action.SITUATION_PUSH_RECEIVED, "value", null)));
    }
/**
     * Test the landing page default predicate accepts Action.SITUATION_PUSH_RECEIVED
     * if the app has been opened in the last week.
     */
Test the landing page default predicate accepts Action.SITUATION_PUSH_RECEIVED
if the app has been opened in the last week.
Test the landing page default predicate accepts Action . SITUATION_PUSH_RECEIVED if the app has been opened in the last week .
@Test
    public void testLandingPageDefaultPredicateAccepts() {
        registry.registerDefaultActions(TestApplication.getApplication());
        ActionRegistry.Entry entry = registry.getEntry("^p");
        assertNotNull("Landing Page should have a default predicate", entry.getPredicate());
        when(metrics.getLastOpenTimeMillis()).thenReturn(System.currentTimeMillis() - 6 * 24 * 1000 * 3600);
        assertTrue("Should accept PUSH_RECEIVED when the app has been opened in the last week.",
                entry.getPredicate().apply(ActionTestUtils.createArgs(Action.SITUATION_PUSH_RECEIVED, "value", null)));
    }
@ Test public void testLandingPageDefaultPredicateAccepts ( ) { registry . registerDefaultActions ( TestApplication . getApplication ( ) ) ; ActionRegistry . Entry entry = registry . getEntry ( "^p" ) ; assertNotNull ( "Landing Page should have a default predicate" , entry . getPredicate ( ) ) ; when ( metrics . getLastOpenTimeMillis ( ) ) . thenReturn ( System . currentTimeMillis ( ) - 6 * 24 * 1000 * 3600 ) ; assertTrue ( "Should accept PUSH_RECEIVED when the app has been opened in the last week." , entry . getPredicate ( ) . apply ( ActionTestUtils . createArgs ( Action . SITUATION_PUSH_RECEIVED , "value" , null ) ) ) ; }
Test the landing page default predicate accepts Action.SITUATION_PUSH_RECEIVED
 if the app has been opened in the last week.
Test the landing page default predicate accepts Action . SITUATION_PUSH_RECEIVED if the app has been opened in the last week .
// Set the last open to 6 days ago