@Test
public void testConfigOverridesOnCreation() {

    TestAuditLogger alogger = new TestAuditLogger();
    System.setProperty(ZMSConsts.ZMS_PROP_USER_DOMAIN_ALIAS, "xyz");
    System.setProperty(ZMSConsts.ZMS_PROP_SIGNED_POLICY_TIMEOUT, "86400");
    System.setProperty(ZMSConsts.ZMS_PROP_VIRTUAL_DOMAIN_LIMIT, "10");
    System.setProperty(ZMSConsts.ZMS_PROP_CORS_ORIGIN_LIST, "a.com,b.com");
    ZMSImpl zmsImpl = getZmsImpl(alogger);
    assertEquals(zmsImpl.virtualDomainLimit, 10);
    assertEquals(zmsImpl.userDomainAliasPrefix, "xyz.");
    assertEquals(zmsImpl.signedPolicyTimeout, 1000 * 86400);
    assertTrue(zmsImpl.isValidCORSOrigin("a.com"));
    System.clearProperty(ZMSConsts.ZMS_PROP_USER_DOMAIN_ALIAS);
    System.clearProperty(ZMSConsts.ZMS_PROP_SIGNED_POLICY_TIMEOUT);
    System.clearProperty(ZMSConsts.ZMS_PROP_VIRTUAL_DOMAIN_LIMIT);
    System.clearProperty(ZMSConsts.ZMS_PROP_CORS_ORIGIN_LIST);
}