@Override
    public void trash(final Local file) throws LocalAccessDeniedException {
        if(log.isDebugEnabled()) {
            log.debug(String.format("Move %s to Trash", file));
        }
        final ObjCObjectByReference error = new ObjCObjectByReference();
        if(!NSFileManager.defaultManager().trashItemAtURL_resultingItemURL_error(
            NSURL.fileURLWithPath(file.getAbsolute()), null, error)) {
            final NSError f = error.getValueAs(NSError.class);
            if(null == f) {
                throw new LocalAccessDeniedException(file.getAbsolute());
            }
            throw new LocalAccessDeniedException(String.format("%s", f.localizedDescription()));
        }
    }
@Test
    public void testTrashRepeated() throws Exception {
        final FileManagerTrashFeature f = new FileManagerTrashFeature();
        Local l = new Local(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString());
        new DefaultLocalTouchFeature().touch(l);
        assertTrue(l.exists());
        f.trash(l);
        assertFalse(l.exists());
    }