DSpaceServiceManager implements ServiceManagerSystem { @Override public void startup() { if (!testing) { String[] extraConfigs = configurationService.getPropertyAsType("service.manager.spring.configs", String[].class); if (extraConfigs != null) { if (springXmlConfigFiles == null) { springXmlConfigFiles = extraConfigs; } else { springXmlConfigFiles = (String[])ArrayUtils.addAll(springXmlConfigFiles, extraConfigs); } } } try { this.running = true; SpringServiceManager springSMS = new SpringServiceManager(this, configurationService, testing, developing, springXmlConfigFiles); try { springSMS.startup(); } catch (Exception e) { throw new IllegalStateException("failure starting up spring service manager: " + e.getMessage(), e); } this.serviceManagers.add(springSMS); this.primaryServiceManager = springSMS; registerActivators(); notifyServiceManagerReady(); } catch (Exception e) { shutdown(); String message = "Failed to startup the DSpace Service Manager: " + e.getMessage(); log.error(message, e); throw new RuntimeException(message, e); } } DSpaceServiceManager(DSpaceConfigurationService configurationService); protected  DSpaceServiceManager(DSpaceConfigurationService configurationService, String... springXmlConfigFiles); boolean isRunning(); void notifyServiceManagerReady(); @Override void shutdown(); @Override void startup(); void registerService(String name, Object service); @Override void registerServiceNoAutowire(String name, Object service); T registerServiceClass(String name, Class<T> type); void unregisterService(String name); T getServiceByName(String name, Class<T> type); List<T> getServicesByType(Class<T> type); List<String> getServicesNames(); boolean isServiceExists(String name); Map<String, Object> getServices(); void pushConfig(Map<String, Object> properties); static void configureService(String serviceName, Object service, ConfigurationService config); static void initService(Object service); static void shutdownService(Object service);  }
@Test public void testStartup() { configurationService.clear(); dsm.startup(); }
@Test public void testStartupWithConfig() { dsm.startup(); }