@Test
public void testInitialize() {

    System.setProperty(InstanceZTSProvider.ZTS_PROVIDER_DNS_SUFFIX, "zts.cloud");
    System.setProperty(InstanceZTSProvider.ZTS_PRINCIPAL_LIST, "athenz.api,sports.backend");
    InstanceZTSProvider provider = new InstanceZTSProvider();
    provider.initialize("provider", "com.yahoo.athenz.instance.provider.impl.InstanceZTSProvider", null, null);
    assertEquals("zts.cloud", provider.dnsSuffix);
    assertNull(provider.keyStore);
    assertEquals(provider.principals.size(), 2);
    assertTrue(provider.principals.contains("athenz.api"));
    assertTrue(provider.principals.contains("sports.backend"));
    provider.close();
    System.setProperty(InstanceZTSProvider.ZTS_PROVIDER_DNS_SUFFIX, "");
    System.setProperty(InstanceZTSProvider.ZTS_PRINCIPAL_LIST, "");
    provider = new InstanceZTSProvider();
    provider.initialize("provider", "com.yahoo.athenz.instance.provider.impl.InstanceZTSProvider", null, null);
    assertEquals("zts.athenz.cloud", provider.dnsSuffix);
    assertNull(provider.keyStore);
    assertNull(provider.principals);
    provider.close();
    System.clearProperty(InstanceZTSProvider.ZTS_PROVIDER_DNS_SUFFIX);
}