    @Test
    public void testMatches()
    {

        assertThat(new PatternMatch("/").matches("/aaa/"), is(false));
        assertThat(new PatternMatch("aaa").matches("b"), is(false));

        assertThat(new PatternMatch("aaa").matches("aaa"), is(true));

        assertThat(new PatternMatch("a*c").matches("abc"), is(true));
        assertThat(new PatternMatch("a*c").matches("abcd"), is(false));

        assertThat(new PatternMatch("*a*c").matches("xxabc"), is(true));

        assertThat(new PatternMatch("a*c*").matches("abcxxx"), is(true));
        assertThat(new PatternMatch("a*c*").matches("xxabcxx"), is(false));
    }