@Test
public void testMatches() {

    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", "a/**/e.txt"), is(true));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", "a/*/e.txt"), is(false));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", "**/e.txt"), is(true));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", "*/e.txt"), is(false));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", Lists.newArrayList("**/e.txt"), false), is(true));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", Lists.newArrayList("*/e.txt"), true), is(false));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", null, false), is(false));
    assertThat(FileNameUtil.matches("a/b/c/d/e.txt", null, true), is(true));
}