### Question:
PublicSuffixMatcher { private static boolean match(final DomainType domainType, final DomainType expectedType) { return domainType != null && (expectedType == null || domainType.equals(expectedType)); } PublicSuffixMatcher(final Collection<String> rules, final Collection<String> exceptions);  PublicSuffixMatcher(
            final DomainType domainType, final Collection<String> rules, final Collection<String> exceptions);  PublicSuffixMatcher(final Collection<PublicSuffixList> lists); String getDomainRoot(final String domain); String getDomainRoot(final String domain, final DomainType expectedType); boolean matches(final String domain); boolean matches(final String domain, final DomainType expectedType);  }### Answer:
@Test public void testMatch() { Assert.assertTrue(matcher.matches(".jp")); Assert.assertTrue(matcher.matches(".ac.jp")); Assert.assertTrue(matcher.matches(".any.tokyo.jp")); Assert.assertFalse(matcher.matches(".metro.tokyo.jp")); Assert.assertFalse(matcher.matches(".xx")); Assert.assertFalse(matcher.matches(".appspot.com")); }