@Test
public void testIsConsistentRoleName() {

    
    Role role = new Role();
    
    role.setName("domain1:role.role1");
    assertTrue(zms.isConsistentRoleName("domain1", "role1", role));
    
    // local name behavior
    
    role.setName("role1");
    assertTrue(zms.isConsistentRoleName("domain1", "role1", role));
    assertEquals(role.getName(), "domain1:role.role1");
    
    // inconsistent behavior
    
    role.setName("domain1:role.role1");
    assertFalse(zms.isConsistentRoleName("domain1", "role2", role));
    
    role.setName("role1");
    assertFalse(zms.isConsistentRoleName("domain1", "role2", role));
}