@Test
public void testGetPolicyListWithoutAssertionId() {

    
    assertNull(zms.getPolicyListWithoutAssertionId(null));
    
    List<Policy> emptyList = new ArrayList<>();
    List<Policy> result = zms.getPolicyListWithoutAssertionId(emptyList);
    assertTrue(result.isEmpty());
    
    final String domainName = "assertion-test";
    Policy policy = createPolicyObject(domainName, "policy1");
    policy.setCaseSensitive(true);
    Assertion assertion = new Assertion();
    assertion.setAction("update");
    assertion.setEffect(AssertionEffect.ALLOW);
    assertion.setResource(domainName + ":resource");
    assertion.setRole(ZMSUtils.roleResourceName(domainName, "admin"));
    assertion.setId(101L);
    assertion.setCaseSensitive(true);
    policy.getAssertions().add(assertion);
    
    List<Policy> policyList = new ArrayList<>();
    policyList.add(policy);
    
    result = zms.getPolicyListWithoutAssertionId(policyList);
    assertEquals(result.size(), 1);
    Assertion testAssertion = result.get(0).getAssertions().get(0);
    assertNull(testAssertion.getId());
    assertEquals(assertion.getAction(), "update");
    assertEquals(assertion.getEffect(), AssertionEffect.ALLOW);
    assertEquals(assertion.getResource(), domainName + ":resource");
    assertEquals(assertion.getRole(), ZMSUtils.roleResourceName(domainName, "admin"));
    // Verify case-sensitivity isn't returned
    assertNull(result.get(0).getCaseSensitive());
    assertNull(testAssertion.getCaseSensitive());
}