@Override
    public boolean register(final Application application) {
        final Local helper = new FinderLocal(new BundleApplicationResourcesFinder().find().getParent(),
                String.format("Library/LoginItems/%s.app", application.getName()));
        if(!finder.register(helper)) {
            log.warn(String.format("Failed to register %s (%s) with launch services", helper,
                    finder.getDescription(application.getIdentifier())));
        }
        if(!ServiceManagementFunctions.library.SMLoginItemSetEnabled(application.getIdentifier(), true)) {
            log.warn(String.format("Failed to register %s as login item", application));
            return false;
        }
        return true;
    }
@Test
    public void testRegister() {
        assertFalse(new ServiceManagementApplicationLoginRegistry().register(
                new Application("bundle.helper")));
    }