@Test public void shouldDetermineIfPatternMatchesAnything() { assertThat(PathExpression.compile("/.").matchesAnything(), is(true)); assertThat(PathExpression.compile("//").matchesAnything(), is(true)); assertThat(PathExpression.compile("///").matchesAnything(), is(true)); assertThat(PathExpression.compile("///").matchesAnything(), is(true)); assertThat(PathExpression.compile("/*").matchesAnything(), is(true)); assertThat(PathExpression.compile("*").matchesAnything(), is(true)); assertThat(PathExpression.compile("*[*]").matchesAnything(), is(true)); assertThat(PathExpression.compile("*[]").matchesAnything(), is(true)); assertThat(PathExpression.compile("/a").matchesAnything(), is(false)); assertThat(PathExpression.compile("/*[3]").matchesAnything(), is(false)); assertThat(PathExpression.compile("/a/b/c").matchesAnything(), is(false)); }