@Test
public void testGetPolicies() {

    
    final String domainName = "get-policies";
    TopLevelDomain dom1 = createTopLevelDomainObject(domainName,
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Policy policy1 = createPolicyObject(domainName, "policy1");
    zms.putPolicy(mockDomRsrcCtx, domainName, "policy1", auditRef, policy1);
    Policy policy2 = createPolicyObject(domainName, "policy2");
    zms.putPolicy(mockDomRsrcCtx, domainName, "policy2", auditRef, policy2);
    Policies policyList = zms.getPolicies(mockDomRsrcCtx, domainName, Boolean.TRUE);
    List<Policy> policies = policyList.getList();
    assertEquals(3, policies.size()); // need to account for admin policy
    
    boolean policy1Check = false;
    boolean policy2Check = false;
    
    List<Assertion> testAssertions;
    for (Policy policy : policies) {
        switch (policy.getName()) {
            case "get-policies:policy.policy1":
                testAssertions = policy.getAssertions();
                assertEquals(testAssertions.size(), 1);
                policy1Check = true;
                break;
            case "get-policies:policy.policy2":
                testAssertions = policy.getAssertions();
                assertEquals(testAssertions.size(), 1);
                policy2Check = true;
                break;
        }
    }
    
    assertTrue(policy1Check);
    assertTrue(policy2Check);
    
    zms.deleteTopLevelDomain(mockDomRsrcCtx, domainName, auditRef);
}