@Test
    public void testNameCoverageSubdomainWithWildcardOfSameDomain() throws Exception
    {
        // setup
        final String name = "xmpp.example.org";
        final String pattern = "*.xmpp.example.org";

        // do magic
        final boolean result = DNSUtil.isNameCoveredByPattern( name, pattern );

        // verify
        assertTrue( result );
    }
A test that verifies that {@link DNSUtil#isNameCoveredByPattern(String, String)} finds a match when the
needle/name equals the domain part of the DNS pattern, while the DNS pattern includes a wildcard.

Although somewhat shady, the certificate management in Openfire depends on this to hold true.
xmppserver/src/test/java/org/jivesoftware/openfire/net/DNSUtilTest.java