@Override
    public WatchKey register(final Watchable folder, final WatchEvent.Kind<?>[] events,
                             final WatchEvent.Modifier... modifiers) throws IOException {
        if(null == monitor) {
            monitor = FileSystems.getDefault().newWatchService();
        }
        final WatchKey key = folder.register(monitor, events, modifiers);
        if(log.isInfoEnabled()) {
            log.info(String.format("Registered for events for %s", key));
        }
        return key;
    }
@Test(expected = IOException.class)
    public void testNotfound() throws Exception {
        final FileWatcher watcher = new FileWatcher(new NIOEventWatchService());
        final Local file = new Local(System.getProperty("java.io.tmpdir") + "/notfound", UUID.randomUUID().toString());
        assertFalse(file.exists());
        watcher.register(file.getParent(), new FileWatcher.DefaultFileFilter(file), new DisabledFileWatcherListener());
    }