### Question:
DefaultHostnameVerifier implements HttpClientHostnameVerifier { static boolean matchDomainRoot(final String host, final String domainRoot) { if (domainRoot == null) { return false; } return host.endsWith(domainRoot) && (host.length() == domainRoot.length() || host.charAt(host.length() - domainRoot.length() - 1) == '.'); } DefaultHostnameVerifier(final PublicSuffixMatcher publicSuffixMatcher);  DefaultHostnameVerifier(); @Override boolean verify(final String host, final SSLSession session); @Override void verify(
            final String host, final X509Certificate cert);  }### Answer:
@Test public void testDomainRootMatching() { Assert.assertFalse(DefaultHostnameVerifier.matchDomainRoot("a.b.c", null)); Assert.assertTrue(DefaultHostnameVerifier.matchDomainRoot("a.b.c", "a.b.c")); Assert.assertFalse(DefaultHostnameVerifier.matchDomainRoot("aa.b.c", "a.b.c")); Assert.assertFalse(DefaultHostnameVerifier.matchDomainRoot("a.b.c", "aa.b.c")); Assert.assertTrue(DefaultHostnameVerifier.matchDomainRoot("a.a.b.c", "a.b.c")); }