@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 testTrashNonEmpty() throws Exception {
        final Trash trash = new FileManagerTrashFeature();
        final SupportDirectoryFinder finder = new TemporarySupportDirectoryFinder();

        final Local temp = finder.find();
        final Local directory = LocalFactory.get(temp, UUID.randomUUID().toString());
        directory.mkdir();
        final Local sub = LocalFactory.get(directory, UUID.randomUUID().toString());
        sub.mkdir();
        final Local file = LocalFactory.get(sub, UUID.randomUUID().toString());
        final Touch touch = LocalTouchFactory.get();
        touch.touch(file);

        trash.trash(directory);
    }