urbanairship-core/src/test/java/com/urbanairship/js/WhitelistTest.java
@Test
    public void testHostWildCardSubDomain() {
        assertTrue(whitelist.addEntry("http://*.urbanairship.com"));

        // Accept
        assertTrue(whitelist.isWhitelisted("http://what.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://hi.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://urbanairship.com", Whitelist.SCOPE_ALL));

        // Reject
        assertFalse(whitelist.isWhitelisted("http://lololurbanairship.com", Whitelist.SCOPE_ALL));
    }
/**
     * Test wild card for subdomain accepts any subdomain, including no subdomain.
     */
Test wild card for subdomain accepts any subdomain, including no subdomain.
Test wild card for subdomain accepts any subdomain including no subdomain .
@Test
    public void testHostWildCardSubDomain() {
        assertTrue(whitelist.addEntry("http://*.urbanairship.com"));
        assertTrue(whitelist.isWhitelisted("http://what.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://hi.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://urbanairship.com", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://lololurbanairship.com", Whitelist.SCOPE_ALL));
    }
@ Test public void testHostWildCardSubDomain ( ) { assertTrue ( whitelist . addEntry ( "http://*.urbanairship.com" ) ) ; assertTrue ( whitelist . isWhitelisted ( "http://what.urbanairship.com" , Whitelist . SCOPE_ALL ) ) ; assertTrue ( whitelist . isWhitelisted ( "http://hi.urbanairship.com" , Whitelist . SCOPE_ALL ) ) ; assertTrue ( whitelist . isWhitelisted ( "http://urbanairship.com" , Whitelist . SCOPE_ALL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://lololurbanairship.com" , Whitelist . SCOPE_ALL ) ) ; }
Test wild card for subdomain accepts any subdomain, including no subdomain.
Test wild card for subdomain accepts any subdomain including no subdomain .
// Accept // Reject