@Override
    public NSImage fileIcon(final Local file, final Integer size) {
        NSImage icon = null;
        if(file.exists()) {
            icon = this.load(file.getAbsolute(), size);
            if(null == icon) {
                return this.cache(file.getName(),
                        this.convert(file.getName(), workspace.iconForFile(file.getAbsolute()), size), size);
            }
        }
        if(null == icon) {
            return this.iconNamed("notfound.tiff", size);
        }
        return icon;
    }
@Test
    public void testIconForPathFolder() throws Exception {
        final Path f = new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
        final NSImageIconCache cache = new NSImageIconCache();
        NSImage icon = cache.fileIcon(f, 16);
        assertNotNull(icon);
        assertTrue(icon.isValid());
        assertFalse(icon.isTemplate());
    }