@Override
    public boolean accept(final Local file) {
        if(pattern.matcher(file.getName()).matches()) {
            if(log.isDebugEnabled()) {
                log.debug(String.format("Skip %s excluded with regex", file));
            }
            return false;
        }
        return true;
    }
@Test
    public void testAccept() {
        final Pattern pattern = Pattern.compile(".*~\\..*|\\.DS_Store|\\.svn|CVS");
        assertFalse(new UploadRegexFilter(pattern).accept(new NullLocal(".DS_Store")));
        assertTrue(new UploadRegexFilter(pattern).accept(new NullLocal("f")));
        assertTrue(new UploadRegexFilter(Pattern.compile("")).accept(new NullLocal("f")));
        assertTrue(new UploadRegexFilter(Pattern.compile("")).accept(new NullLocal(".DS_Store")));
    }