match("//*/cccc", "/bbb/aaa/ccc/cccc", true);
match("//aaa/*", "/bbb/aaa/ccc/cccc", false);
}
private void match(String ptnStr1, String ptnStr2, boolean expected) {
StaticContext statEnv = new StaticContext();
NamespaceBinder namespaces = statEnv.getStaticalyKnownNamespaces();
XMLPathPattern ptn1 = new XMLPathPattern(ptnStr1, namespaces);
XMLPathPattern ptn2 = new XMLPathPattern(ptnStr2, namespaces);
Assert.assertSame(ptn1 + " <-> " + ptn2, expected, ptn1.match(ptn2));
}