protected boolean update(final Local file, final NSImage icon) {
        synchronized(NSWorkspace.class) {
            // Specify 0 if you want to generate icons in all available icon representation formats
            if(workspace.setIcon_forFile_options(icon, file.getAbsolute(), new NSUInteger(0))) {
                workspace.noteFileSystemChanged(new NFDNormalizer().normalize(file.getAbsolute()).toString());
                return true;
            }
            return false;
        }
    }
@Test
    public void testSetProgressFolder() throws Exception {
        final WorkspaceIconService s = new WorkspaceIconService();
        final Local file = new Local(PreferencesFactory.get().getProperty("tmp.dir"),
                UUID.randomUUID().toString());
        new DefaultLocalDirectoryFeature().mkdir(file);
        assertTrue(s.update(file, NSImage.imageWithContentsOfFile("../../img/download0.icns")));
    }