@Override
    public void setDefaultHandler(final Application application, final List<String> schemes) {
        final WorkspaceSchemeHandlerProxy proxy = WorkspaceSchemeHandlerProxy.create();
        for(String scheme : schemes) {
            final String path = workspace.absolutePathForAppBundleWithIdentifier(application.getIdentifier());
            if(null != path) {
                final CountDownLatch lock = new CountDownLatch(1);
                final Proxy callback = new Proxy(new WorkspaceSchemeHandlerProxy.CompletionHandler() {
                    @Override
                    public void didFinishWithError(final NSError error) {
                        if(error != null) {
                            log.warn(String.format("Setting scheme handler returned with error %s", error));
                        }
                        lock.countDown();
                    }
                });
                proxy.setDefaultHandler(NSURL.fileURLWithPath(path), scheme, callback.id());
                if(log.isInfoEnabled()) {
                    log.info(String.format("Await result from %s", proxy));
                }
                Uninterruptibles.awaitUninterruptibly(lock);
            }
        }
    }
@Test
    @Ignore
    public void testSetDefaultHandler() {
        assumeTrue(Factory.Platform.osversion.matches("12\\..*"));
        final Application application = new Application("com.apple.finder");
        final WorkspaceSchemeHandler handler = new WorkspaceSchemeHandler(new LaunchServicesApplicationFinder());
        final String scheme = new AlphanumericRandomStringService().random();
        handler.setDefaultHandler(application, Collections.singletonList(scheme));
        assertTrue(handler.getAllHandlers(scheme).contains(application));
        assertEquals(application, handler.getDefaultHandler(scheme));
    }