InstanceProviderManager { ProviderScheme getProviderScheme(URI uri) { final String scheme = uri.getScheme(); if (scheme == null) { LOGGER.error("verifyProviderEndpoint: Provider endpoint {} has no scheme component", uri.toString()); return ProviderScheme.UNKNOWN; } ProviderScheme schemeType; switch (scheme.toLowerCase()) { case SCHEME_HTTPS: schemeType = ProviderScheme.HTTPS; break; case SCHEME_CLASS: schemeType = ProviderScheme.CLASS; break; default: schemeType = ProviderScheme.UNKNOWN; } return schemeType; } InstanceProviderManager(DataStore dataStore, SSLContext sslContext, KeyStore keyStore);   }
@Test public void testGetProviderScheme() throws URISyntaxException { InstanceProviderManager provider = new InstanceProviderManager(null, null, null); URI uri = new URI("https: assertEquals(provider.getProviderScheme(uri), ProviderScheme.HTTPS); uri = new URI("class: assertEquals(provider.getProviderScheme(uri), ProviderScheme.CLASS); uri = new URI("http: assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN); uri = new URI("ftp: assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN); uri = new URI("test.athenz2.com/"); assertEquals(provider.getProviderScheme(uri), ProviderScheme.UNKNOWN); }