{
use(new FileWatcher()
.register(Paths.get("workdir", "watchme"), MyFileEventHandler.class)
);
}
It is a minor bug due the background thread is a daemon and goes automatically down on application shutdown. Still, it doesn't go down in embedded system like integration tests.