ServiceLocatorImpl implements ServiceLocator { String getStrategyKey(final String url) { if (url.indexOf(':') > -1) { return url.substring(0, url.indexOf(':')); } return null; } ServiceLocatorImpl();  ServiceLocatorImpl(final List<InstantiationStrategy> strategies); @Override T getServiceInstance(final String serviceUrl,
                                    final Class<T> iface,
                                    final String loginName,
                                    final String password); @Override void register(final InstantiationStrategy instantiationStrategy);  }
@Test public void testGetStrategyKey() throws Exception { ServiceLocatorImpl serviceLocatorImpl = new ServiceLocatorImpl(null); assertNull(serviceLocatorImpl.getStrategyKey("leninAndBenderZhiveeSvesZhivih")); assertEquals("http", serviceLocatorImpl.getStrategyKey("http: assertEquals("https", serviceLocatorImpl.getStrategyKey("https: assertEquals("jnp", serviceLocatorImpl.getStrategyKey("jnp: }