@Test
public void testGetProviderEndpointScheme() throws URISyntaxException {

    
    InstanceProviderManager provider = new InstanceProviderManager(null, null, null);
    URI uri = new URI("https://test.athenz2.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.HTTPS);
    
    uri = new URI("https://test.athenz2.com:4443/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.HTTPS);
    
    uri = new URI("https://test.athenz2.com:4443/test1");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.HTTPS);
    
    uri = new URI("class://com.yahoo.athenz.AWSProvider");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.CLASS);
    uri = new URI("http://test.athenz.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    
    uri = new URI("https://test.athenz4.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    
    uri = new URI("http://test.athenz.com:4443/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    
    uri = new URI("http://test.athenz.com:4443/test1");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    
    uri = new URI("http://:4443?key=value");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("http://test.athenz3.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("http://test.athenz3.com:4443/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("http://test.athenz3.com:4443/test1");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    
    uri = new URI("test.athenz.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("file://test.athenz.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("//test.athenz.com/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("test://test.athenz.com:4443/");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
    uri = new URI("uri://test.athenz.com:4443/test1");
    assertEquals(provider.getProviderEndpointScheme(uri), ProviderScheme.UNKNOWN);
}