@Override
    public NSImage applicationIcon(final Application app, final Integer size) {
        NSImage icon = this.load(app.getIdentifier(), size);
        if(null == icon) {
            final String path = workspace.absolutePathForAppBundleWithIdentifier(app.getIdentifier());
            // Null if the bundle cannot be found
            if(StringUtils.isNotBlank(path)) {
                return this.cache(app.getIdentifier(),
                        this.convert(app.getIdentifier(), workspace.iconForFile(path), size), size);
            }
        }
        if(null == icon) {
            return this.iconNamed("notfound.tiff", size);
        }
        return icon;
    }
@Test
    public void testCacheApplicationIcon() {
        final NSImageIconCache cache = new NSImageIconCache();
        final NSImage icon32 = cache.applicationIcon(new Application("com.apple.TextEdit"), 32);
        assertNotNull(icon32);
        assertEquals(32, icon32.size().width.intValue());
        assertEquals(32, icon32.size().height.intValue());
        final NSImage icon16 = cache.applicationIcon(new Application("com.apple.TextEdit"), 16);
        assertNotNull(icon16);
        assertEquals(16, icon16.size().width.intValue());
        assertEquals(16, icon16.size().height.intValue());
        final NSImage icon64 = cache.applicationIcon(new Application("com.apple.TextEdit"), 64);
        assertNotNull(icon64);
        assertEquals(64, icon64.size().width.intValue());
        assertEquals(64, icon64.size().height.intValue());
    }