void () { final Pattern pattern = convertToPattern("dir/*?*"); assertTrue(pattern.matcher("dir/subdir").matches()); assertFalse(pattern.matcher("dir/subdir/ttt").matches()); assertFalse(pattern.matcher("dir/subdir/aaa/ttt.txt").matches()); }