@Test
public void testConvertToLowerCasePolicyMultipleAssertion() {

    
    Policy policy = new Policy();
    policy.setName(ZMSUtils.policyResourceName("CoreTech", "policy"));
    
    Assertion assertion1 = new Assertion();
    assertion1.setAction("Read");
    assertion1.setEffect(AssertionEffect.ALLOW);
    assertion1.setResource("coreTech:VIP.*");
    assertion1.setRole("coretech:role.Role1");
    
    Assertion assertion2 = new Assertion();
    assertion2.setAction("UPDATE");
    assertion2.setEffect(AssertionEffect.ALLOW);
    assertion2.setResource("CoreTech:VIP.*");
    assertion2.setRole("coretech:role.RoleAB");
    
    List<Assertion> assertList = new ArrayList<>();
    assertList.add(assertion1);
    assertList.add(assertion2);
    
    policy.setAssertions(assertList);
    
    AthenzObject.POLICY.convertToLowerCase(policy);
    assertEquals(policy.getName(), "coretech:policy.policy");
    Assertion assertion = policy.getAssertions().get(0);
    assertEquals(assertion.getRole(), "coretech:role.role1");
    assertEquals(assertion.getAction(), "read");
    assertEquals(assertion.getResource(), "coretech:vip.*");
    
    assertion = policy.getAssertions().get(1);
    assertEquals(assertion.getRole(), "coretech:role.roleab");
    assertEquals(assertion.getAction(), "update");
    assertEquals(assertion.getResource(), "coretech:vip.*");
    // Now check case-sensitive
    policy = new Policy();
    policy.setName(ZMSUtils.policyResourceName("CoreTech", "policy"));
    policy.setCaseSensitive(true);
    assertion1 = new Assertion();
    assertion1.setAction("Read");
    assertion1.setEffect(AssertionEffect.ALLOW);
    assertion1.setResource("coreTech:VIP.*");
    assertion1.setRole("coretech:role.Role1");
    assertion2 = new Assertion();
    assertion2.setAction("UPDATE");
    assertion2.setEffect(AssertionEffect.ALLOW);
    assertion2.setResource("CoreTech:VIP.*");
    assertion2.setRole("coretech:role.RoleAB");
    assertList = new ArrayList<>();
    assertList.add(assertion1);
    assertList.add(assertion2);
    policy.setAssertions(assertList);
    AthenzObject.POLICY.convertToLowerCase(policy);
    assertEquals(policy.getName(), "coretech:policy.policy");
    assertion = policy.getAssertions().get(0);
    assertEquals(assertion.getRole(), "coretech:role.role1");
    assertEquals(assertion.getAction(), "Read");
    assertEquals(assertion.getResource(), "coretech:VIP.*");
    assertion = policy.getAssertions().get(1);
    assertEquals(assertion.getRole(), "coretech:role.roleab");
    assertEquals(assertion.getAction(), "UPDATE");
    assertEquals(assertion.getResource(), "coretech:VIP.*");
}