@Test
public void testNormalizeDomainAliasUser() {

    ZMSImpl zmsImpl = zmsInit();
    zmsImpl.userDomain = "user";
    zmsImpl.userDomainPrefix = "user.";
    zmsImpl.userDomainAlias = null;
    zmsImpl.userDomainAliasPrefix = null;
    
    assertNull(zmsImpl.normalizeDomainAliasUser(null));
    assertEquals(zmsImpl.normalizeDomainAliasUser("user-alias.user1"), "user-alias.user1");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user-alias.user1.svc"), "user-alias.user1.svc");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user.user2"), "user.user2");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user.user2.svc"), "user.user2.svc");
    
    zmsImpl.userDomainAlias = "user-alias";
    zmsImpl.userDomainAliasPrefix = "user-alias.";
    assertNull(zmsImpl.normalizeDomainAliasUser(null));
    assertEquals(zmsImpl.normalizeDomainAliasUser("user-alias.user1"), "user.user1");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user-alias.user1.svc"), "user-alias.user1.svc");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user.user2"), "user.user2");
    assertEquals(zmsImpl.normalizeDomainAliasUser("user.user2.svc"), "user.user2.svc");
    zmsImpl.objectStore.clearConnections();
}