/**
* Test method for {@link org.apache.felix.useradmin.impl.RoleRepository#getRoles(String, String)}.
*/
public void testGetRolesWithKeyValuePairOk() throws Exception {
Role role1 = m_roleRepository.addRole("foo", Role.USER);
role1.getProperties().put("key", "value1");
role1.getProperties().put("keyA", "valueA");
Role role2 = m_roleRepository.addRole("bar", Role.GROUP);
role2.getProperties().put("key", "value2");
role2.getProperties().put("keyB", "value1");
assertSameRoles(new Role[]{ role1 }, m_roleRepository.getRoles("key", "value1"));
assertSameRoles(new Role[]{ role2 }, m_roleRepository.getRoles("key", "value2"));
assertSameRoles(new Role[0], m_roleRepository.getRoles("key", "value"));
}