@Test
public void testListPrincipalsUsersOnly() {

    
    String domainName = "listusers1";
    
    TopLevelDomain dom1 = createTopLevelDomainObject(domainName,
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    TopLevelDomain dom2 = createTopLevelDomainObject("listusersports",
            "Test Domain2", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom2);
    
    TopLevelDomain dom3 = createTopLevelDomainObject("listuserweather",
            "Test Domain3", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom3);
    
    Role role1 = createRoleObject(domainName, "role1", null,
            "user.joe", "user.janie");
    zms.putRole(mockDomRsrcCtx, domainName, "role1", auditRef, role1);
    
    Role role2 = createRoleObject(domainName, "role2", null,
            "user.joe", "listusersports.jane");
    zms.putRole(mockDomRsrcCtx, domainName, "role2", auditRef, role2);
    Role role3 = createRoleObject(domainName, "role3", null,
            "user.jack", "listuserweather.jane");
    zms.putRole(mockDomRsrcCtx, domainName, "role3", auditRef, role3);
    
    Role role4 = createRoleObject("listusersports", "role4", null,
            "user.ana", "user.janie");
    zms.putRole(mockDomRsrcCtx, "listusersports", "role4", auditRef, role4);
    
    List<String> users = zms.dbService.listPrincipals("user", true);
    assertEquals(users.size(), 5);
    assertTrue(users.contains("user.testadminuser"));
    assertTrue(users.contains("user.janie"));
    assertTrue(users.contains("user.ana"));
    assertTrue(users.contains("user.jack"));
    assertTrue(users.contains("user.joe"));
    
    zms.deleteTopLevelDomain(mockDomRsrcCtx, domainName, auditRef);
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "listusersports", auditRef);
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "listuserweather", auditRef);
}