@Override
    public Application find(final String filename) {
        final String extension = Path.getExtension(filename);
        if(!defaultApplicationCache.contains(extension)) {
            if(StringUtils.isEmpty(extension)) {
                return Application.notfound;
            }
            final String path = this.findForType(extension);
            if(StringUtils.isEmpty(path)) {
                defaultApplicationCache.put(extension, Application.notfound);
            }
            else {
                final NSBundle bundle = NSBundle.bundleWithPath(path);
                if(null == bundle) {
                    log.error(String.format("Loading bundle %s failed", path));
                    defaultApplicationCache.put(extension, Application.notfound);
                }
                else {
                    defaultApplicationCache.put(extension, this.getDescription(bundle.bundleIdentifier()));
                }
            }
        }
        return defaultApplicationCache.get(extension);
    }
@Test
    public void testFindByFilename() {
        ApplicationFinder f = new LaunchServicesApplicationFinder();
        assertEquals(new Application("com.apple.Preview", "Preview"), f.find("file.png"));
        assertEquals(Application.notfound, f.find("file.txt_"));
    }