DomainUtils { public static boolean checkWildcardHostName(@Nonnull String referenceHost, @Nonnull String actualHost) throws IllegalArgumentException { return checkHostName(referenceHost, actualHost, true); }  static boolean checkHostName(@Nonnull String referenceHost, @Nonnull String actualHost); static boolean checkWildcardHostName(@Nonnull String referenceHost, @Nonnull String actualHost); static boolean checkHostName(@Nonnull String referenceHost, @Nonnull String actualHost,
	    boolean allowWildcard);  }
@Test public void compareWildcardDomains() { Assert.assertTrue(DomainUtils.checkWildcardHostName("foö.bär.com", "foö.bär.com")); Assert.assertTrue(DomainUtils.checkWildcardHostName("foö.bär.com", IDN.toASCII("foö.bär.com"))); Assert.assertTrue(DomainUtils.checkWildcardHostName("*.bär.com", "foö.bär.com")); Assert.assertFalse(DomainUtils.checkWildcardHostName("*.bär.com", "bar.com")); Assert.assertFalse(DomainUtils.checkWildcardHostName("bär.com", "foö.bar.com")); Assert.assertFalse(DomainUtils.checkWildcardHostName("*.com", "foö.bar.com")); }