void () { QualifiedNameMatcher matcher = new QualifiedNameMatcher(QualifiedName.fromDottedString("foo.bar.baz")); assertTrue(matcher.prefixMatches("foo.bar.baz")); assertTrue(matcher.prefixMatches("foo.bar.baz")); assertTrue(matcher.prefixMatches("fooExtra.bar.baz")); assertTrue(matcher.prefixMatches("foo.barExtra.baz")); assertTrue(matcher.prefixMatches("foo.bar.bazExtra")); assertFalse(matcher.prefixMatches("")); assertFalse(matcher.prefixMatches("baz")); assertFalse(matcher.prefixMatches("foo.bar")); assertFalse(matcher.prefixMatches("bar.baz")); assertTrue(matcher.prefixMatches("foo.xxx.bar.baz")); assertTrue(matcher.prefixMatches("foo.bar.xxx.baz")); assertFalse(matcher.prefixMatches("foo.bar.baz.xxx")); assertFalse(matcher.prefixMatches("xxx.foo.bar.baz")); assertFalse(matcher.prefixMatches("nonfoo.foo.bar.baz")); }