DSpaceServiceManager implements ServiceManagerSystem { public boolean isServiceExists(String name) { checkRunning(); if (name == null) { throw new IllegalArgumentException("name cannot be null"); } boolean exists = false; for (ServiceManagerSystem sms : serviceManagers) { try { exists = sms.isServiceExists(name); if (exists) { break; } } catch (Exception e) { } } return exists; } 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 testIsServiceExists() { dsm.startup(); String name = ConcreteExample.class.getName(); boolean exists = dsm.isServiceExists(name); assertTrue(exists); name = SampleAnnotationBean.class.getName(); exists = dsm.isServiceExists(name); assertTrue(exists); name = SpringAnnotationBean.class.getName(); exists = dsm.isServiceExists(name); assertTrue(exists); exists = dsm.isServiceExists("XXXXXXXXXXXXXXX"); assertFalse(exists); }