@Override
    public void setQuarantine(final Local file, final String originUrl, final String dataUrl) throws LocalAccessDeniedException {
        if(StringUtils.isEmpty(originUrl)) {
            log.warn("No origin url given for quarantine");
            return;
        }
        if(StringUtils.isEmpty(dataUrl)) {
            log.warn("No data url given for quarantine");
            return;
        }
        synchronized(lock) {
            if(!this.setQuarantine(file.getAbsolute(), originUrl, dataUrl)) {
                throw new LocalAccessDeniedException(file.getAbsolute());
            }
        }
    }
@Test
    public void testSetQuarantine() throws Exception {
        final QuarantineService q = new LaunchServicesQuarantineService();
        Callable<Local> c = new Callable<Local>() {
            @Override
            public Local call() throws Exception {
                final NullLocal l = new NullLocal(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString());
                LocalTouchFactory.get().touch(l);
                q.setQuarantine(l,
                        "http://cyberduck.ch", "http://cyberduck.ch");
                l.delete();
                return l;
            }
        };
        c.call();
    }